haskellubuntuubuntu-11.04cabalcabal-install

How do you install packages/libraries without Cabal or Cabal-Install?


I'm trying to set up Haskell from scratch, on Ubuntu 11.04, without using the outdated Debian repository or Haskell-Platform.

I've installed GHC-7.0.4 from source with no problem, and now need to install Cabal (which appears to already be included in GHC in /usr/local/lib/ghc-7.0.4/Cabal-1.10.2.0) and Cabal Install.

The latter specifies several dependencies (parsec and network), each of which has several dependencies of their own (mtl, text, etc).

What's the command to install these packages, that I downloaded from hackage in tar.gz form?

Unpack, then runhaskell doesn't work.

I see Setup.lhs, but it's not clear what that's for or how to use it.

Most of the Haskell documentation I've found assumes you've installed from a repo or Haskell-Package and doesn't really explain this well.


Solution

  • cabal-install has a shell script that does this. If you download it from hackage and install it, you can start bootstrap.sh to install cabal-install. You can then use it to install other packages.