Recommended way to install, use and maintain haskell tools on OS X

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Recommended way to install, use and maintain haskell tools on OS X

Nicola Gigante
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
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Recommended way to install, use and maintain haskell tools on OS X

Carter Schonwald
ignore all the stuff about haskell platform. 


and the Library /  ~/Library stuff is wholely an artifact of haskell platform. use the vanilla  cabal config setup that uses ~/.cabal and entails putting ~/.cabal/bin in your PATH

use cabal sandbox for application dev that you plan to deploy elsewhere / share (because you'll easily wind up having multiple projects going on at once)
and use normal cabal install (into ~/.cabal) otherwise.




On Sun, Oct 19, 2014 at 7:42 AM, Nicola Gigante <[hidden email]> wrote:
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
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Recommended way to install, use and maintain haskell tools on OS X

Nicola Gigante

Il giorno 19/ott/2014, alle ore 18:52, Carter Schonwald <[hidden email]> ha scritto:

ignore all the stuff about haskell platform. 


and the Library /  ~/Library stuff is wholely an artifact of haskell platform. use the vanilla  cabal config setup that uses ~/.cabal and entails putting ~/.cabal/bin in your PATH

use cabal sandbox for application dev that you plan to deploy elsewhere / share (because you'll easily wind up having multiple projects going on at once)
and use normal cabal install (into ~/.cabal) otherwise.


Thanks for the hint!

Do you know if that package already works well on Yosemite?

Bye,
Nicola


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Recommended way to install, use and maintain haskell tools on OS X

Omari Norman-2
In reply to this post by Carter Schonwald
On Sun, Oct 19, 2014 at 12:52 PM, Carter Schonwald <[hidden email]> wrote:
ignore all the stuff about haskell platform. 



How is this better than installing GHC from


and then getting cabal install from


The ghcformacosx installs some man pages apparently, and it's just one step; any other advantages?

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Recommended way to install, use and maintain haskell tools on OS X

Nicola Gigante

Il giorno 20/ott/2014, alle ore 13:24, Omari Norman <[hidden email]> ha scritto:

On Sun, Oct 19, 2014 at 12:52 PM, Carter Schonwald <[hidden email]> wrote:
ignore all the stuff about haskell platform. 



How is this better than installing GHC from


and then getting cabal install from


The ghcformacosx installs some man pages apparently, and it's just one step; any other advantages?


Also what’s the difference from the homebrew formulas for ghc and cabal-install?

Bye,
Nicola

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Recommended way to install, use and maintain haskell tools on OS X

Bob Ippolito
In reply to this post by Omari Norman-2


On Monday, October 20, 2014, Omari Norman <[hidden email]> wrote:
On Sun, Oct 19, 2014 at 12:52 PM, Carter Schonwald <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;carter.schonwald@gmail.com&#39;);" target="_blank">carter.schonwald@...> wrote:
ignore all the stuff about haskell platform. 



How is this better than installing GHC from


and then getting cabal install from


The ghcformacosx installs some man pages apparently, and it's just one step; any other advantages?

That's precisely what it is, just quicker and simpler to install as it's one download, there's no build step, and it can help you change your PATH. No technical advantages.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Recommended way to install, use and maintain haskell tools on OS X

Carter Schonwald
further more, no ghc dev is currently actively involved in helping maintain the brew ghc/cabal-install/whatever formulas, so generally they are more likely to have problems (though they look like broken when i checked recently)

On Mon, Oct 20, 2014 at 12:27 PM, Bob Ippolito <[hidden email]> wrote:


On Monday, October 20, 2014, Omari Norman <[hidden email]> wrote:
On Sun, Oct 19, 2014 at 12:52 PM, Carter Schonwald <[hidden email]> wrote:
ignore all the stuff about haskell platform. 



How is this better than installing GHC from


and then getting cabal install from


The ghcformacosx installs some man pages apparently, and it's just one step; any other advantages?

That's precisely what it is, just quicker and simpler to install as it's one download, there's no build step, and it can help you change your PATH. No technical advantages.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe