Getting Cabal to run on Mac OS X Leopard
In preparation for the work on my Haskell NXT Library, I needed to install Yampa today. The official page lists version 0.9.1 as most recent, though that release is from 2002. Newer (though kinda "inofficial") versions are available through Hackage/Cabal. Getting Cabal to work wasn't difficult at all in the end, but scraping together all the information on how to get there was a bit tricky for an absolute n00b like me. I publish my steps here so that others trying to get Cabal to run on Leopard (or other systems) can save some time.
I installed darcs too, but I don't even think that was necessary (
sudo port install darcs)
Now, the most recent Cabal Library (the one included in MacPorts GHC was a bit outdated):
Go to http://haskell.org/cabal/, download and untar the most recent Cabal (library) and cabal-install (commandline interface) packages. Install Cabal as root, as described in the readme-file:
ghc --make Setup.hs ./Setup configure ./Setup build sudo ./Setup install
ghc --make Setup.lhs (.lhs in case of HTTP, zlib uses the .hs extension) ./Setup configure ./Setup build sudo ./Setup install
Finally change to the cabal-install directory and repeat these steps again.
After cabal-install is installed, run
cabal update to obtain the latest package list. Now you can install packages via
cabal install <package name>