Politics, Programming and Possibilities
28 Feb
Most languages have a nice package management system that helps install new software or libraries—Ruby has the “gem” system, Perl has cpan, etc. In Haskell, it’s “cabal”, and here is how you install it:
darcs get http://darcs.haskell.org/cabal-install
cd cabal-install
sh bootstrap.sh
In addition, you should occasionally use the “update” command to sync your local package listing with the centralized one:
cabal update
To install a remote package, simply use “cabal install
cabal install happstack
Also noteworthy is that you can use cabal to install a package from the local directory. For example, if you’ve fetched something using darcs, you could procede to install it like this:
darcs get --lazy http://code.haskell.org/yi/
cd yi
cabal install
Update: To install yi above, I also had to install a package called “alex” which is outside the cabal system at this point. I used MacPorts, i.e. “sudo port install alex”.
Leave a reply