Posted on March 1, 2015

When in cabal hell, remember:

First, clean everything.

cabal clean
rm -rf .cabal-sandbox/ cabal.sandbox.config
rm -rf ~/.ghc ~/.cabal/

Then create your sandbox and initialize cabal.

cabal sandbox init
cabal update

Configure and install your dependencies.

cabal configure --enable-tests
cabal install --only-dependencies --enable-tests

And finally build and run your tests. Remember that -v3 is your friend here.

cabal build -v3
cabal test -v3