Today I wanted to spent some of my time installing and configuring Cabal;
I recently installed the new version of GHC (7.6.1) for Archlinux, and cabal suggested me to update my cabal package from 1.10 to a newer version. But, when I was trying to install it (cabal install cabal-install), I got an error.
cabal install cabal-install
Resolving dependencies...cabal: Couldn't read cabal file "hashable/18.104.22.168/hashable.cabal"
Well, I searched a little on the web, and I found that I have to install it manually, so I downloaded the newer version of Cabal from Hackage and tried to install it again.
However, I got another error again. This time, it was a compilation error on the package HTTP, on the file Auth.hs, something with URL’s.
Trying to fix it manually, I noticed that the bootstrap.sh was installing the version 2.4 of HTTP but there were a newer 2.6 version. So I changed to the new one and worked it out.
The next steps was to configure cabal. It is not needed for normal use, but personally I prefer that cabal installs my packages on /usr/local/bin and not below my user (~/.cabal/). And also I want cabal to generate the documentation automatically, etc. So a few changes on the cabal config file (~/.cabal/config) is needed.
First, global installation: just uncomment some fields
You will also need to install the package haddock (cabal install haddock) for documentation.
One thing I don’t know but I would like, is to automatically generate hscolour output on the documentation. It would be wonderful to have all packages with his colored code available on documentation.
That’s all I think.
PS: Don’t forget to do cabal update right after installing cabal.