On 08/12/2010 03:29 PM, Brandon S Allbery KF8NH wrote:
Then build your CGIs restricted.  Restricting the runtime by default,
*especially* when setting runtime options at compile time is so much of a
pain, is just going to cause problems.  I'm already thinking that I may have
to skip ghc7.

With current versions of GHC, to set the default RTS options you need to do some insanity with linking in a C stub or something absurd like that.

However, take a look at this:

http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/runtime-control.html#id3095435

It appears that with GHC 7, you can just say something like -with-rtsopts="-H128m -K1m" while compiling your program, and now that will forever be the default RTS settings for your program.

I haven't actually tried this myself, however. In particular, I'm not sure if you have to turn on the full RTS options before this will work...