Description
When a user uses stack to manage GHC installations they can call ghc programs (such as ghc
, ghci
, runghc
, etc) directly by running for example stack exec -- ghc Main.hs
. However, many tutorials and tools expect ghc
and friends to be available on path.
In order to have ghc
related programs available on path one can:
- Install GHC separately
- Create a wrapper shell program that runs
stack exec -- ghci $@
I use (2) and it works pretty well, so my suggestion is to streamline (2) as a feature in stack: when running stack setup
, stack could check if the ghc programs are available on path, and if they aren't suggest to create wrapper scripts for the user (in ~/.local/bin
for example).
The benefit is that users which are not interested in installing ghc manually can use tutorials and tools that expect ghc programs on path without modification.