I've decided to try giving stack a shot. I've installed it and used it to install the latest version of ghc. I've used stack to install some packages but the packages are not visible to ghc and when I list packages with ghc-pkg I see that the packages that I've installed through stack are not there. Why is this? Am I misunderstanding the purpose of stack?
In its default configuration, Stack will simply ignore any system GHC installation and use a sandboxed GHC that it has installed itself. You can find these sandboxed GHC installations in the ghc-* directories in the stack path --programs directory.
Stack installs the Stackage libraries in ~/. stack and any project libraries or extra dependencies in a . stack-work directory within each project's directory.
If you don't need a fully partitioned GHC environment and are happy with the installed versions on DICE, cabal might be the simplest way to install the Haskell packages you require. By default stack installs packages to ~/. cabal and ~/. ghc in your home directory.
html -> click on system information-> login with admin rights -> you can get all details about the installed server.
Stack never touches global packages database. It uses layered database approach
Thus instead of polluting global database, most packages are installed in snapshot database(s), so most packages can be shared. As packages in stackage snapshots are compatible (i.e. always compile together), we don't run into Cabal hell.
You can use stack ghci
or stack ghc
to run corresponding commands with package database configured.
The more precise explanation is in the stack wiki
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With