Archive for the ‘haskell’ Category

Haskell’s Biggest Problem?

Sunday, April 18th, 2010

My biggest problem with Haskell right now is package and dependency management.

Cabal along with the Haskell Platform are supposed to address this, but it seems like every time I want to install a new package I run into tons of dependency issues.

Currently I’m playing around with this SDL tutorial. When I tried to:

cabal install base

I got this:

Resolving dependencies...
cabal: internal error: impossible

After googling around, I thought maybe the problem was that I’m running ghc 6.10.3 (the version I got by installing the Haskell Platform on Ubuntu) instead of the latest 6.12.1.

I’m still not even sure this is the reason for Cabal’s cryptic error, but trying to install 6.12 on Ubuntu is turning out to be a chore. After more googling, I came across this guide: Installation of GHC 6.12.1 on Ubuntu 9.10 (for Hubris)

If that document doesn’t convince you that Haskell has some installation and dependency management ugliness, I don’t know what will.

Maybe after I get more used to the Haskell ecosystem I’ll understand these things more intuitively. Right now, though, this whole affair is quite frustrating.

—-
Update: Since writing this, I’ve tried installing the same package in OS X. The Haskell Platform contains GHC 6.12.1, but the version of Cabal I had installed doesn’t work with 6.12.x. So, I upgraded Cabal and…

RMBP:bin rdickerson$ ./cabal install base
Resolving dependencies...
cabal: Distribution/Client/Dependency/TopDown.hs:171:37-73: Non-exhaustive patterns in lambda

This is really awful.

Installing Cabal on Ubuntu Hardy

Monday, March 16th, 2009

I just went through a bit of a frustrating time getting cabal (the Haskell package management system) going on a fresh Ubuntu install. (Figuring out I needed to install the zlib package mentioned in step three below was the worst of it).

I thought I’d document the steps I went through in case I ever need to do it again:

  1. Install GHC.
    sudo apt-get install ghc
  2. Download and extract the cabal installation tool: cabal-install-0.6.2.tar.gz. (This page will probably keep an up-to-date link for future versions).
  3. Make sure this zlib package is installed:

    sudo apt-get install zlib1g-dev
  4. Run the bootstrap.sh shell script extracted in step two.
  5. Either add ~/.cabal/bin to your $PATH or copy it to a $PATH location.

The Cabal-Install instruction page is located here.