[Haskell-cafe] Intended behavior of -no-rtsopts-suggestions

Michael Snoyman michael at snoyman.com
Wed Nov 23 05:11:01 UTC 2016


I'm trying to compile an executable which will totally ignore RTS options
flags (have the runtime completely ignore them). It seemed like a combo of
-rtsopts=none and -no-rtsopts-suggestions[1] would achieve this. However, I
can't figure out what the presence of that flag is doing. Can someone give
me a pointer to what my expected behavior should be here, and even better
how to achieve my goal of having the runtime ignore +RTS on the command
line?

$ cat Main.hs
import System.Environment
main = getArgs >>= print
$ ghc -rtsopts=none -no-rtsopts-suggestions Main.hs -fforce-recomp &&
./Main +RTS -s
[1 of 1] Compiling Main             ( Main.hs, Main.o )
Linking Main ...
Main: RTS options are disabled. Link with -rtsopts to enable them.
$ ghc -rtsopts=none Main.hs -fforce-recomp && ./Main +RTS -s
[1 of 1] Compiling Main             ( Main.hs, Main.o )
Linking Main ...
Main: RTS options are disabled. Link with -rtsopts to enable them.

[1]
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html?highlight=rtsopts#ghc-flag--no-rtsopts-suggestions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161123/7b506433/attachment.html>


More information about the Haskell-Cafe mailing list