Reputation: 833
Hi in my package toaster
, i cabal v2-install lib:toaster --package-env ~/myenv/
In the ~/myenv/
dir, there is .ghc.environment.x86_64-linux-9.2.2
I've also set the environment variable to point to the myenv
dir.
Unfortunately, cabal install
doesn't update the environment.
Am i doing the wrong way?
when I runghc Hello.hs
, it says that toaster
is hidden.
Found the answer:
cabal install --lib lib:toaster --overwrite-policy=always --env ~/dev/haskell/pkg_env/
Upvotes: 1
Views: 576
Reputation: 152707
By default, cabal install
only installs executables, storing libraries built along the way only in its cache. If you want the library to be put somewhere, you must add --lib
to your cabal install
line.
Upvotes: 1