Two Questions: 'memory consumption' and '-pgmL'

Peter Simons
08 Jan 2003 20:08:43 +0100

Hi everybody,

first of all, let me thank you for writing and maintaining this
excellent compiler! I am using it a lot recently and I couldn't be
more happy with it. Thanks! :-)

I wouldn't be posting here, though, if hadn't had a questions ... So
here I go:

 (1) Using the DtdToHaskell tool, I converted the XML Docbook DTD to
     Haskell code. The resulting parser is amazing: It is almost 4
     megabyte large, 72800 lines of code. Now I tried to compile this
     beast and ran fresh out of memory.

     I fiddled with the RTS options to no avail. At some point GHC was
     consuming more than 800 megabytes of RAM, what resulted in
     serious thrashing (my machine has only 512 MB) and eventually the
     process was terminated.

     Does anyone have by any ideas how I could tackle this problem?
     Can I reduce GHC's memory requirements somehow? Can I split the
     module up and compile it in parts? In different phases? Anything?
     (If nothing comes up, I guess buying some more RAM is the

 (2) According to the documentation, GHC allows for setting the
     literate pre-processor to be used when compiling an .lhs file.
     This is supposed to occur with the '-pgmL' option, but no matter
     what I try, GHC always tells me:

        | ghc-5.04.2: unrecognised flags: -pgmL
        | Usage: For basic information, try the `--help' option.

     Am I doing something wrong or is the documentation out of synch
     with the implementation?

Any comments will be appreciated!


P. S.: I am not subscribed to this list, so please Cc any replies
       to me.