Cogs and Levers A blog full of technical stuff

cabal sandbox ghci

A very quick post that is based on the information from this stack overflow article on how to get a GHCi session up and running with the libraries referenced that you’ve installed using your cabal sandbox.

cd $YOUR_PACKAGE_DIR
 
# For GHC >= 7.6
ghci -no-user-package-db -package-db .cabal-sandbox/i386-linux-ghc-7.6.1-packages.conf.d
 
# For GHC < 7.6
ghci -no-user-package-conf -package-conf .cabal-sandbox/i386-linux-ghc-7.4.2-packages.conf.d