I want to check if some package is installed globally by stack
. How to do that?
You can either use the dpkg command's log or the apt command's log. You'll have to use grep command to filter the result to list the installed packages only. This will list all the packages including the dependencies that were installed recently on your system along with the time of installation.
Stack installs the Stackage libraries in ~/. stack and any project libraries or extra dependencies in a . stack-work directory within each project's directory.
Just to make visible, that there is already an answer from user2407038...
The following command lists all packages, including the installed ones
stack exec ghc-pkg -- list
Created the following output for ghc 8.8.4 (private output is kept private):
C:\Users\Joerg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.4\lib\package.conf.dCabal-3.0.1.0
Win32-2.6.1.0
array-0.5.4.0
base-4.13.0.0
binary-0.8.7.0
bytestring-0.10.10.1
containers-0.6.2.1
deepseq-1.4.4.0
directory-1.3.6.0
filepath-1.4.2.1
(ghc-8.8.4)
ghc-boot-8.8.4
ghc-boot-th-8.8.4
ghc-compact-0.1.0.0
ghc-heap-8.8.4
ghc-prim-0.5.3
ghci-8.8.4
haskeline-0.7.5.0
hpc-0.6.0.3
integer-gmp-1.0.2.0
libiserv-8.8.4
mtl-2.2.2
parsec-3.1.14.0
pretty-1.1.3.6
process-1.6.9.0
rts-1.0
stm-2.5.0.0
template-haskell-2.15.0.0
text-1.2.4.0
time-1.9.3
transformers-0.5.6.2
xhtml-3000.2.2.1
C:\sr\snapshots\...
...
C:\...\...\.stack-work\install\...\pkgdb
...
https://docs.haskellstack.org/en/stable/GUIDE/#different-databases
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