[Haskell-beginners] ways to use local ghc without installing packages via cabal install --lib

Dennis Raddle dennis.raddle at gmail.com
Tue Jan 17 22:07:48 UTC 2023


I have a situation where I build some projects with stack (using VS Code
and HLS) and build some projects with ghc installed via ghcup. For the
latter I need to install the needed packages with cabal install --lib
<package> which are some of the same packages specified in my stack.yaml.

I've been playing with Windows, macOS, various versions of the resolver,
various versions of GHC, cabal, and stack. At one point I had both the HLS
and my local ghc builds working.

Recently I'm not sure what changed but I found myself needing to run cabal
install --lib on many packages. At that point HLS stopped working with the
message that it could not determine the local GHC version.

After poking around the web, it seems that similar problems were happening
for other people when they were running both a stack project and compiling
via ghc separately, and that cabal install --lib was a problem.

So I'm wondering if there's an alternative way of using separate ghc
builds.

Alternatively I can try to move everything under stack, that is doable, but
not as convenient for some things
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20230117/e4c4da10/attachment.html>


More information about the Beginners mailing list