ghc: out of memory error while compiling huge "let"

Simon Marlow simonmarhaskell at
Mon Jan 15 09:58:19 EST 2007

Neil Mitchell wrote:

> I found that GHC is O(n^2) in terms of the number of lines in a do
> block, so by splitting up a huge 1000 line do block in to 10 x 100
> line do blocks, I was able to get a massive compile time boost.
> Perhaps you might have similar luck with let's.

Didn't we fix the do-block blowup?

Certainly do submit a bug report if you find GHC going O(n^2) or worse on any 
particular construct, usually we can find the culprit and fix it.


More information about the Glasgow-haskell-users mailing list