The premiere Haskell web application stack, HappS, is getting a considerable boost this week. Several Haskell developers are getting together to tidy things up and improve the packaging and documentation. I’m on the documentation team even though I don’t know anything about it. We’ll see if I can add any value :)

Anyway, I had a really difficult time installing the “HappS-Tutorial” package and wanted to lay down a few pointers for anyone else who may be having difficulty. After finding, downloading and installing Cabal (Haskell’s package distribution system) on my Mac, I tried to install the HappS-Tutorial package:

$ cabal install happs-tutorial


Unfortunately, there are some dependency problems in the tutorial as it currently stands but I didn’t find that out until after I had removed the “.cabal” directory in my home directory. Apparently that messed up some dependencies on my own system and caused cabal to think that packages were installed when they weren’t.

So, to make a long story short, if you get an error message like this:

Crypto/PBKDF2.hs:20:7:
    Could not find module `Data.Binary':
      Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
PBKDF2-0.3 failed during the building phase. The exception was:
exit: ExitFailure 1


You may have to go through the dependencies one by one (using the remarkable hoogle search utility) and manually reinstall packages like this:

$ cabal --reinstall install binary


Where “binary” is the particular package I needed in this case.

In case anyone has to go through the dependency hunting process like I did, here is a list of the HappS Tutorial dependencies.