You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This stackoverflow question brings up a case of trying to run stack runghc with GHCRTS set, in an attempt to get RTS arguments passed to the user's program. Passing in -N fails because ghc-pkg isn't built with -threading. I don't think it makes sense to pass the GHCRTS environment variable through to every haskell program stack invokes, it is too blunt of a hammer. Instead, users can use things like --haddock-arguments, --ghc-options, etc.
I think it makes sense to only pass GHCRTS through for the programs run via stack exec / stack runghc / stack runhaskell / stack script / stack ghci / stack repl / stack eval.
Note that there's no avoiding stack itself also getting these RTS arguments. In the case of ghc, the RTS arguments will be used by stack, ghc, and the program that gets run. So, this is indeed quite a hack. Would be good to get this fixed in ghc itself.
One thing that occurs to me is that it might be good to have a STACK_GHCRTS var, to allow specifying GHCRTS without. Alternatively, maybe this should just be a commandline options. Thoughts?
The text was updated successfully, but these errors were encountered:
Also, there is another small behavior change here, which is
that when ghcjs-boot is run, UTF8 locale environment variables
get set. I hope this only fixes things, rather than breaking
anything!
This stackoverflow question brings up a case of trying to run
stack runghc
with GHCRTS set, in an attempt to get RTS arguments passed to the user's program. Passing in-N
fails becauseghc-pkg
isn't built with-threading
. I don't think it makes sense to pass the GHCRTS environment variable through to every haskell program stack invokes, it is too blunt of a hammer. Instead, users can use things like--haddock-arguments
,--ghc-options
, etc.Unfortunately it looks like there is no "proper" way to pass RTS options through runghc - see this other stackoverflow question
I think it makes sense to only pass
GHCRTS
through for the programs run viastack exec
/stack runghc
/stack runhaskell
/stack script
/stack ghci
/stack repl
/stack eval
.Note that there's no avoiding stack itself also getting these RTS arguments. In the case of ghc, the RTS arguments will be used by stack, ghc, and the program that gets run. So, this is indeed quite a hack. Would be good to get this fixed in ghc itself.
One thing that occurs to me is that it might be good to have a
STACK_GHCRTS
var, to allow specifying GHCRTS without. Alternatively, maybe this should just be a commandline options. Thoughts?The text was updated successfully, but these errors were encountered: