til - fp-works/2019-winter-Haskell-school GitHub Wiki
Today I Learned
Install Hoogle on your local machine
$ cabal install hoogle
# Or
stack install hoogle
With Shell
hoogle generate # for the first time
hoogle fmap
With GHCi
:def hoogle \s ->return$":! hoogle --count=15 \""++ s ++"\""
List and uninstall global packages installed by stack
# list global packages
stack exec ghc-pkg -- list # outside of a project directory
stack exec ghc-pkg field <package-name> id
stack exec ghc-pkg unregister <pkg-id>
cd /path/to/stack/packages # This could be something like ~/.local/bin, but is configuration dependent
rm <package name>