stack repl to load those files (stack uses the global project configuration)hie-bios or implicit-hie-cradle //cc @Avi-D-coder @fendor
I can take a look on Christmas.
Thinking in it twice, there exists the possibility of use cabal, as you can set in cabal global config the path to ghc without having it in the global PATH. Not sure if that is a common setup though.
Maybe we should check if cabal exec ghc -- --version works (and in a similar way stack exec ghc -- --version, maybe with --skip-ghc-check to avoid its download?) and proceed to use cabal or stack if ghc is set.
Awesome, this is exactly what I have hoped for a few weeks, but couldn't come up with some specification. Thank you for raising this issue!
I have to say that it arose in a conversation with a haskell beginner (@hieung1401 in the fp discord channel), who was using directly stack for fire a repl.
He had to create a stack project only to make hls work. But even experienced haskell developers work with standalone files so it can be handy for everybody.
Yes, true. I installed system GHC only to make HLS work for small scripts that I need to use from time to time. If HLS supports such a stack detection mechanism, it would allow much compact setting for Haskell dev.
I would say that cabal could not be as useful as stack cause you can configure the stack global project as you want, including dependencies, but afaik you cant do the same in the global cabal config, only set the path to ghc.
So in this case i would choose stack first if both tools are available.
Most helpful comment
I can take a look on Christmas.