I\'ve recently reinstalled my Haskell environment as I thought I had hosed it beyond recovery after updating my Mac OS X to Mavericks.
Now every time I run cabal i
the problem stems from the fact that cabal can track multiple versions of the same package.
Running:
cabal install --reinstall Cabal-1.18.1.3
fixes the problem
One approach is to remove your local ghc
package cache:
$ cd ~/.ghc/ && rm -rf */package.conf.d
$ ghc-pkg --user recache
After you do this, try the cabal
command again.
$ cabal install package-name
That should work. If it doesn't, try removing your cabal
packages, then repeating the above steps:
$ rm -rf ~/.cabal
If you're still having trouble, the missing package may be referred to by the system ghc package cache. Run this command:
$ ghc-pkg --user recache
$ sudo ghc-pkg recache
$ ghc-pkg -v check
The last command should print the system cache. On my GNU/Linux sytem, it prints this:
using cache: /home/sudoman/.ghc/x86_64-linux-7.6.3/package.conf.d/package.cache
using cache: /var/lib/ghc/package.conf.d/package.cache
At that point, I don't have a solution for you based on experience, but you may want to consider removing the ghc system package cache like above, then doing a recache; or re-installing ghc/haskell-platform.