Greetings and Haskell Platform

Andy Kitchen andy at macports.org
Sun Dec 23 21:18:47 PST 2012


Hi All,

I'm a new committer, so, Hi everyone. I'm a 23 y/o Australian, I just
graduated with a Computer Science Degree this year and I'm going
back for honours next year. My interests are functional programming
(Haskell, Clojure, Scheme) and numerical analysis.

Wrt. The Haskell platform, it's a priority for me to get the macports
Haskell platform up-to-date and have an easy way to keep it up to
date.

To this end, I've been thinking that the individual packages approach
that is currently used (ie. one package for each library needed by the
Haskell platform) is flawed.

The Haskell platform people provide a source tar-ball of the Haskell-
platform with source for all dependencies and build scripts included.
In my opinion the most sustainable way of keeping the HP port up-to-
date is to wrap a port around this tarball.

Pros:
- Haskell Platform source tarball already has a ./configure and
  make setup that is easy to wrap in a port.
- No more hassles with micro dependency management of
  2 dozen packages.

Cons:
  - Haskell Platform is all or nothing, one can't choose to install a
    few necessary libraries on their own.
  - When the Haskell platform is updated the whole thing will have to
    be rebuilt instead of just the libraries that have had their versions
    bumped.

I think that not being able to depend on individual libraries is the
largest problem there are two solutions I see:

1) Transition packages that depend on things inside the haskell-
platform to depend on the whole haskell-platform. Because quite a few
of these packages are interdependent anyway this may not be as bad
as it seems.

 2) Keep separate packages around for these libraries and have them
installed in a separate location and use GHC_PACKAGE_PATH inside the
port to bring in these libraries. This only really works if the
dependent port is an executable, but this is probably quite common.

There are also some more complicated issues as well, basically the
versioning system that the haskell package manager (cabal) uses is
different to the macports one. So capturing the dependency structure
of cabal packages with portfiles is impossible and will inevitably
lead to bugs. So trying to keep the hs-* packages working is a tricky
business. I don't think this is overall a good idea. Long term it
might be good to transition to hs-* packages just being shims that
call into cabal-install.

So my questions are:

- If you are currently maintaining a hs-* package, would this change
affect you in a positive/negative way?

- Do you see utility in this change? Perhaps there are very good
reasons that I've overlooked which caused the separate packages
decisions in the first place.


Happy Xmas/Holidays/New Year,


Andy Kitchen

Relevant Links:

http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/packages.html
http://www.haskell.org/platform/linux.html


More information about the macports-dev mailing list