#5970: Type checker hangs
------------------------------------------+---------------------------------
Reporter: Lemming | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type
checker)
Version: 7.4.1 | Keywords:
Os: Linux | Architecture: x86
Failure: Compile-time performance bug | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------------------+---------------------------------
When compiling my synthesizer-llvm package, GHC-7.4.1 hangs in the type
checking phase for the module
http://code.haskell.org/synthesizer/llvm/src/Synthesizer/LLVM/Server/Packed/Instrument.hs
This module always needed more than a minute for type-checking in
GHC-7.2.2 and before. I guess this was because it is a module where
functions with a lot of type-level arithmetic from the type-level package
are applied to values of concrete types. Maybe with GHC-7.4.1 the
compilation time simply became even longer - at least several minutes.
I tried to simplify the example and reduce the dependencies. This is not
so simple because reducing the module size also decreases type checking
time and when drastically simplified the compilation time for that module
is ok. Now I am trying to construct an example where I repeat the same
(simple) function definition. I already observed that repeating a function
definition n times does not multiply the type checking by n but it needs
considerably more time. I think this can be considered a bug.
I am investigating further. If you have some advice, I like to know. Maybe
you remember a 'foldl' that should be a 'foldr' in the type checker, that
may cause a quadratic type checking time ... If so then this would be a
good opportunity to fix it. ;-)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5970>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs