[Haskell-cafe] Compiling an extremely large Haskell file (in GHC)

robert dockins robdockins at fastmail.fm
Mon Jun 27 14:35:30 EDT 2005

Arjun Guha wrote:

> I have an extremely large source file of about 11 MB.  It's the all-pairs 
> shortest paths data for a map of the Hyde Park area of Chicago (no real 
> reason, really).  I generated information in Scheme and printed the result to 
> a Haskell source file as a list.  I then edited the file to initialized an 
> array with the data.
> GHC, with a 200MB stack, took up 1 hour and 1.3 GB of memory before getting 
> killed by the system.  How would I compile something of this size?  I need to 
> have the array of all-pairs shortest paths pre-computed.  Any suggestions?

Don't do that. ;)

Seriously though, you would probably have better luck parsing a data 
file at runtime rather than trying to compile it in.  It might even be 
that the "read" implementation for lists will be sufficent for what you 

More information about the Haskell-Cafe mailing list