haskell/hie-bios

How to use GHC installed by stack?

Closed this issue · 2 comments

I use GHC installed via stack, since I don't want to install ghc directly. However there's no way to use stack ghc on direct mode (although there is a way to specify the arguments.) Is there a way to use stack ghc instead of ghc?

One possible way is perhaps add the path to GHC when running LS; another way may be add an additional field of hie.yaml so that we can specify the path to ghc at custom location. The most desired is to add some option to use stack ghc instead of ghc on direct mode.

I would think a simple stack cradle works, in theory if stack repl file works, a cradle: stack: will work 🤔

@jneira It worked, thanks!

For beginners like me, for search convenience * How to run a single file compiled with GHC? * How to run a standalone file?