GHC 6.10.2 consuming lots of memory while compiling - help?

Don Stewart dons at galois.com
Fri Jul 24 17:02:35 EDT 2009


jgbailey:
> I apologize in advance for the vagueness of my report here - it's one
> of those situations I'm not sure how to cut it down to size yet.
> 
> I have a module that uses HaskellDB and Template Haskell together. The
> module itself depends on 23 other modules, each of which give a type
> definition for a particular database table or view. I only mention
> that to emphasize that the module depends on some "big" types (HList
> records w/ 20+ members) and on compile-time generated code.
> 
> My problem is this - when GHC compile the module, it consumes 1.2 GB
> of memory, takes about 10 minutes, and finally produces an object
> file. The memory usage seems related to template haskell, but I'm not
> positive.
> 
> I've attached verbose output from compiling the module in question.
> The command line I used was:
> 
>   ghc -v --make -c DeliveryManagementQueries.hs -XEmptyDataDecls
> -XTypeSynonymInstances -XTemplateHa
> skell
> 
> Now for my question - please ignore the specifics of
> haskelldb/template haskell - any suggestions for figuring out what GHC
> is doing, besides tried-and-true divide and conquer?
> 

Oh, and I note you're not using -O or -O2 either?

-- Don


More information about the Glasgow-haskell-users mailing list