Why those packages installed in those locations?
/usr/local/lib/ghc-7.6.3 contains libraries that come with ghc. And /usr/local/lib contains libraries from "haskell platform"
How do i delete the whole cabal packages for reinstall?
Use ghc-pkg
to unregister libraries in /usr/local/lib. It is better not to do that with libraries /usr/local/lib/ghc-7.6.3
Which installation options allow me to put all cabal packages into a single folder?
AFAIK there are no such option
(not tutorial intended) Is it better to learn to solve the cabal hell? I've heard about ghc-pkg
After the new constrains solver was introduced in cabal, the cabal hell almost disappeared for me. The last cabal-install
release introduced sandboxes, and other improvements coming. I hope the cabal hell will disappear completely in near future.
Sometimes it is necessary to manually solve dependency conflicts by e.g. unregistering some packages using ghc-pkg
.
i used to delete the whole .cabal folder when i got into the cabal hell
You should delete ~/.ghc/
subfolder instead of ~/.cabal
. It is where ghc stores package db. With new cabal sandboxes you need to delete only the sandbox itself (cabal sandbox delete
)