[Haskell-cafe] Minimal Haskell Platform

Travis Cardwell travis.cardwell at extellisys.com
Tue Apr 15 01:35:20 UTC 2014


I have been using Haskell Platform since it was introduced because I have 
always heard that it is the recommended way to use GHC.  Indeed, Haskell 
Platform has made the installation of a Haskell environment quite 
straightforward.  My current usage strategy is a common one:

* Only install Haskell Platform in --global.
* Avoid installing into ~/.cabal (when possible).
* Develop exclusively in Cabal sandboxes.

In a recent /r/haskell post [1], user mightybyte commented:
 > This. The Haskell Platform installs a bunch of packages for you in
 > --global. My experience is that this inevitably leads to problems if
 > you're doing significant Haskell development. The best thing to do is
 > to minimize the number of packages installed as --global. The way to do
 > that is to install GHC directly and avoid using the Haskell Platform or
 > Haskell distributions provided by your OS.

Asking about it in #haskell, it seems that a number of developers 
recommend such a minimal installation, particularly for large projects.  I 
am very interested in minimizing the number of packages in --global, and I 
would like to start testing my software against the current Haskell 
Platform *as well as* such a minimal installation.

I my initial tests (Debian stable amd64; minimal virtual machine), I tried 
installing GHC 7.8.2 and cabal-install (using bootstrap.sh) only. 
Installation went fine, `cabal update` worked fine, and `cabal sandbox 
init` worked fine.  I then tried `cabal install hlint` (within the 
sandbox), and it successfully compiles a number of packages before failing 
when trying to build haskell-src-exts, complaining that happy could not be 
found.  Running `cabal install happy` failed with the "setup: The program 
happy is required but it could not be found" error.  Building happy via 
the source Setup.lhs worked fine, and installing the binary into my 
installation bin directory results in an environment in which I am able to 
`cabal install hlint` (and `cabal install happy`) into a sandbox without 

It is interesting that cabal does not (try to) install happy as a 
prerequisite for haskell-src-exts, which lists happy as a Build-Tools 
dependency [2].  It is also interesting that `cabal install happy` 
requires itself, despite indication in the documentation [3] that it is a 
valid way to install the package...

Does this indicate that Cabal expects Haskell Platform?

Should Cabal be changed to (support minimal installations and) manage 
Build-Tools dependencies?

Would it be worthwhile to create a "Minimal Haskell Platform" to create a 
truly common platform that everybody would be happy using?



[1] http://www.reddit.com/r/haskell/comments/22up8l/ghc_782_released/
[3] http://www.haskell.org/happy/

More information about the Haskell-Cafe mailing list