A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/commercialhaskell/stack/issues/3444 below:

Stack should hide GHCRTS environment variable · Issue #3444 · commercialhaskell/stack · GitHub

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.

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 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?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4