[Haskell-beginners] -with-rtsopts ignored at compile time

Brandon Allbery allbery.b at gmail.com
Mon Oct 21 12:52:36 UTC 2013


On Mon, Oct 21, 2013 at 8:01 AM, Kees Bleijenberg <
k.bleijenberg at lijbrandt.nl> wrote:

> When I run my program, I get a stack overflow message (current stacksize
> is 8388608 bytes) and the advice to use +RTS –Ksize  -RTS****
>
> The Haskell code creates a Windows dll, so no command line. That’s why I
> want to change the stack size at compile time.
>

I think the default RTS options are only settable in a compile that
produces an executable; otherwise there would have to be a chunk of code
that retrieved all the rtsopts from every Haskell-compiled DLL and somehow
reconciled any conflicts between them. Also note that if the main program
is in C, you don't get -with-rtsopts processing at all; see
http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-mainfor
how you set RTS options in this case. (See at "To use +RTS flags with
hs_init()".)

In this particular case you may be better off just using the %GHCRTS%
environment variable.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20131021/71b5cdc9/attachment.html>


More information about the Beginners mailing list