[Haskell] GHC: Setting default +RTS options at compile time?

Andreas Marth Andreas-Haskell at gmx.net
Fri Mar 18 08:38:20 EST 2005

I had the same question quite some time ago and got an answe from Simon
Marlow. You may search for that. Or you can use the attached file.

Have fun,

PS: You first compile RTSHooks.c and than your other Haskell files plus
RTSHooks.o. Eg. ghc --make Main.hs RTSHooks.o

----- Original Message ----- 
From: "Graham Klyne" <gk at ninebynine.org>
To: "Haskell Mailing List" <haskell at haskell.org>
Sent: Friday, March 18, 2005 2:18 PM
Subject: [Haskell] GHC: Setting default +RTS options at compile time?

> Is there any way to specify at compile/link time default options for GHC
> program +RTS options?
> I'm using the latest release (6.4).
> #g
> --
> <aside>
> Why do I want this?  I'm using GHC to write a program that will be used by
> non-comp uting people to preprocess some data in conjunction with an 18Mb
> database file.  To load the database into a Data.Map value requires more
> than GHC's default 256Mb of heap, and I'd like to increase the program's
> default heap size, rather than telling users to use the +RTS -M100M
> as its one less thing to get wrong.  There are of course other possible
> solutions, but in this case specifying a default heap size at compile time
> seems to be the most natural.
> </aside>
> ------------
> Graham Klyne
> For email:
> http://www.ninebynine.org/#Contact
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RTSHooks.c
Type: application/octet-stream
Size: 32 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell/attachments/20050318/474cf379/RTSHooks.obj

More information about the Haskell mailing list