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

Kirsten Chevalier catamorphism at
Fri Jan 12 12:44:38 EST 2007

On 1/12/07, David Morse <dcmorse at> wrote:
> Is there some simple syntactic refactoring I can do to make this work?
>  E.g. busting the local bindings out of the "let" and into to the
> global level?
> The bindings are intertwined, but I could (with some effort) reorder
> them so that b5000 would only reference b5001...b10000 and never
> b1...b4999.

Somehow I doubt that the answer is going to be that simple, but for
starters, what's your ghc command line? (In particular, are you
compiling with -O or not? If ghc is eating that much memory than I'd
assume you are, but one should never assume.)


Kirsten Chevalier* chevalier at *Often in error, never in doubt
"by God I *KNOW* what this network is for, and you can't have it."--Russ

More information about the Glasgow-haskell-users mailing list