[Haskell-cafe] Recommended way to install, use and maintain haskell tools on OS X

Nicola Gigante nicola.gigante at gmail.com
Sun Oct 19 11:42:57 UTC 2014


Hi

I know this question might be a little old, but I happen to have a from scratch
installation of OS X (yosemite) on my machine and I want to install the haskell
tools in the currently best way.

So I summarize the options that I understand are available:

1) A non-option first: the Homebrew formula for haskell-platform is no longer
available, but…
2) There are formulas for GHC (7.8.x) and cabal, so I can install those and
install the other packages with the homebrew cabal.
3) I can install the binary distribution of the Haskell Platform for OS X directly
from the website, and then install any needed package with cabal.
4) I’ve heard of Nix, what is this all about?
5) Installing manually the binary distributions of ghc and cabal. No thanks.

That said, what is the recommended way to manage packages once I have
cabal and ghc?

1) Installing everything locally into ~/Library/Haskell, which afaik is the default
behavior of cabal. That also means having ~/Library/Haskell/bin in the PATH.
But do I have to also have ~/.cabal/bin in the PATH? Why having two different
local bin directories? What happens to the packages installed by haskell platform
system-wide? They are left there, shadowed by the local ones, and never again
touched nor updated?

2) Installing everything globally, changing the cabal configuration to make it
the default. Afaik bad idea, but then I don’t have obsoleted packages installed
system-wide.

3) Installing nothing, and relying on sandboxes to install exactly what is needed
for any single package I need. This option is still a bit mysterious to me.
3a) If I need to install a package I need for development, I do cabal sandbox init
in my source tree and then if I install something from inside it, cabal installs it
in the sandbox. Am I correct?
3a) If I need to install a package I need to _use_, instead, what to do?


Sorry for the confusion and thanks for the clarification.

Bye,
Nicola


More information about the Haskell-Cafe mailing list