Program runs out of memory using GHC 7.6.3

Mikolaj Konarski mikolaj at
Sat Dec 13 10:05:59 UTC 2014

tt may be that GHC 7.8 optimizes the program better.
Compile with -O0 and see if it runs out of memory, too.
If so, you can just optimize the program by hand.
I'd suggest making a heap profilie with -O0 or in GHC 7.6
and finding out where the memory goes.

Of course, it's possible you've hit a compiler bug,
but it makes sense not to start with that assumption.

Have fun,

On Sat, Dec 13, 2014 at 10:06 AM, David Spies <dnspies at> wrote:
> I have a program I submitted for a Kattis problem:
> But I got memory limit exceeded.  I downloaded the test data and ran the
> program on my own computer without problems.  Eventually I found out that
> when compiling with GHC 7.6.3 (the version Kattis uses) rather than 7.8.3,
> this program runs out of memory.
> Can someone explain why it only works on the later compiler?  Is there a
> workaround so that I can submit to Kattis?
> Thanks,
> David
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at

More information about the ghc-devs mailing list