Self-contained GHC for Mac

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

Self-contained GHC for Mac

Bob Ippolito
After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)

Why?

It can be a bit cumbersome to use the GHC builds from haskell.org on Mac, because they don't come "fully baked", you have to ./configure --prefix=/some/path to get them installed and the installation is not relocatable, if you move it the scripts will break and the package.conf.d files will go stale. It also doesn't ship with cabal-install, which is cumbersome as well, especially for new users.

How does it work?

In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script which downloads/builds/etc. all of the prerequisites. Then it patches the shell scripts to use a path relative to themselves (after following symlinks) rather than hard-coding an installation location. It also patches the package.conf.d files to use ${pkgroot} relative paths.

Separately, there's an Xcode project that includes all of the metadata to make it look like a real Mac app bundle (icons, Info.plist) and a small Cocoa application that has a button to open the docs and provides instructions for adding it to the PATH in .bashrc. Due to the heuristics in Mac OS X's man, this will automatically make man pages work as well. Using Xcode here also makes it produce a signed build (which I do, since I am already paying for the $99/year license).

-bob


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

Re: Self-contained GHC for Mac

Adam Bergmark-2
Nice, thanks for doing this!

I'll make sure to try this next time i need to install GHC.

- Adam




On Fri, May 23, 2014 at 8:42 PM, Bob Ippolito <[hidden email]> wrote:
After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)

Why?

It can be a bit cumbersome to use the GHC builds from haskell.org on Mac, because they don't come "fully baked", you have to ./configure --prefix=/some/path to get them installed and the installation is not relocatable, if you move it the scripts will break and the package.conf.d files will go stale. It also doesn't ship with cabal-install, which is cumbersome as well, especially for new users.

How does it work?

In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script which downloads/builds/etc. all of the prerequisites. Then it patches the shell scripts to use a path relative to themselves (after following symlinks) rather than hard-coding an installation location. It also patches the package.conf.d files to use ${pkgroot} relative paths.

Separately, there's an Xcode project that includes all of the metadata to make it look like a real Mac app bundle (icons, Info.plist) and a small Cocoa application that has a button to open the docs and provides instructions for adding it to the PATH in .bashrc. Due to the heuristics in Mac OS X's man, this will automatically make man pages work as well. Using Xcode here also makes it produce a signed build (which I do, since I am already paying for the $99/year license).

-bob


_______________________________________________
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: Self-contained GHC for Mac

Kevin Nardi
+1

This is really awesome, and definitely would have made my life easier the first time I installed GHC.

-Kevin

On May 23, 2014, at 11:56 PM, Adam Bergmark <[hidden email]> wrote:

Nice, thanks for doing this!

I'll make sure to try this next time i need to install GHC.

- Adam




On Fri, May 23, 2014 at 8:42 PM, Bob Ippolito <[hidden email]> wrote:
After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)

Why?

It can be a bit cumbersome to use the GHC builds from haskell.org on Mac, because they don't come "fully baked", you have to ./configure --prefix=/some/path to get them installed and the installation is not relocatable, if you move it the scripts will break and the package.conf.d files will go stale. It also doesn't ship with cabal-install, which is cumbersome as well, especially for new users.

How does it work?

In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script which downloads/builds/etc. all of the prerequisites. Then it patches the shell scripts to use a path relative to themselves (after following symlinks) rather than hard-coding an installation location. It also patches the package.conf.d files to use ${pkgroot} relative paths.

Separately, there's an Xcode project that includes all of the metadata to make it look like a real Mac app bundle (icons, Info.plist) and a small Cocoa application that has a button to open the docs and provides instructions for adding it to the PATH in .bashrc. Due to the heuristics in Mac OS X's man, this will automatically make man pages work as well. Using Xcode here also makes it produce a signed build (which I do, since I am already paying for the $99/year license).

-bob


_______________________________________________
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


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

Re: Self-contained GHC for Mac

Carter Schonwald
i'd totally support making this prominently visible  on haskell.org 



On Sat, May 24, 2014 at 2:58 AM, Kevin Nardi <[hidden email]> wrote:
+1

This is really awesome, and definitely would have made my life easier the first time I installed GHC.

-Kevin

On May 23, 2014, at 11:56 PM, Adam Bergmark <[hidden email]> wrote:

Nice, thanks for doing this!

I'll make sure to try this next time i need to install GHC.

- Adam




On Fri, May 23, 2014 at 8:42 PM, Bob Ippolito <[hidden email]> wrote:
After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)

Why?

It can be a bit cumbersome to use the GHC builds from haskell.org on Mac, because they don't come "fully baked", you have to ./configure --prefix=/some/path to get them installed and the installation is not relocatable, if you move it the scripts will break and the package.conf.d files will go stale. It also doesn't ship with cabal-install, which is cumbersome as well, especially for new users.

How does it work?

In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script which downloads/builds/etc. all of the prerequisites. Then it patches the shell scripts to use a path relative to themselves (after following symlinks) rather than hard-coding an installation location. It also patches the package.conf.d files to use ${pkgroot} relative paths.

Separately, there's an Xcode project that includes all of the metadata to make it look like a real Mac app bundle (icons, Info.plist) and a small Cocoa application that has a button to open the docs and provides instructions for adding it to the PATH in .bashrc. Due to the heuristics in Mac OS X's man, this will automatically make man pages work as well. Using Xcode here also makes it produce a signed build (which I do, since I am already paying for the $99/year license).

-bob


_______________________________________________
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


_______________________________________________
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: Self-contained GHC for Mac

Lyndon Maydwell
That's really cool. Is there some way that a CI task could be set up
to automatically publish new versions?

On Sat, May 24, 2014 at 5:03 PM, Carter Schonwald
<[hidden email]> wrote:

> i'd totally support making this prominently visible  on haskell.org
>
>
>
> On Sat, May 24, 2014 at 2:58 AM, Kevin Nardi <[hidden email]> wrote:
>>
>> +1
>>
>> This is really awesome, and definitely would have made my life easier the
>> first time I installed GHC.
>>
>> -Kevin
>>
>> On May 23, 2014, at 11:56 PM, Adam Bergmark <[hidden email]> wrote:
>>
>> Nice, thanks for doing this!
>>
>> I'll make sure to try this next time i need to install GHC.
>>
>> - Adam
>>
>>
>>
>>
>> On Fri, May 23, 2014 at 8:42 PM, Bob Ippolito <[hidden email]> wrote:
>>>
>>> After seeing some demand for packaged Haskell for Mac for the IHaskell
>>> project and by word of mouth at BayHac I decided to take a stab at it. Here
>>> you go:
>>> http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install
>>> 1.20.0.1)
>>>
>>> Why?
>>>
>>> It can be a bit cumbersome to use the GHC builds from haskell.org on Mac,
>>> because they don't come "fully baked", you have to ./configure
>>> --prefix=/some/path to get them installed and the installation is not
>>> relocatable, if you move it the scripts will break and the package.conf.d
>>> files will go stale. It also doesn't ship with cabal-install, which is
>>> cumbersome as well, especially for new users.
>>>
>>> How does it work?
>>>
>>> In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script
>>> which downloads/builds/etc. all of the prerequisites. Then it patches the
>>> shell scripts to use a path relative to themselves (after following
>>> symlinks) rather than hard-coding an installation location. It also patches
>>> the package.conf.d files to use ${pkgroot} relative paths.
>>>
>>> Separately, there's an Xcode project that includes all of the metadata to
>>> make it look like a real Mac app bundle (icons, Info.plist) and a small
>>> Cocoa application that has a button to open the docs and provides
>>> instructions for adding it to the PATH in .bashrc. Due to the heuristics in
>>> Mac OS X's man, this will automatically make man pages work as well. Using
>>> Xcode here also makes it produce a signed build (which I do, since I am
>>> already paying for the $99/year license).
>>>
>>> -bob
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>
>> _______________________________________________
>> 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
>
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Self-contained GHC for Mac

Bob Ippolito
That's certainly technically possible

On Saturday, May 24, 2014, Lyndon Maydwell <[hidden email]> wrote:
That's really cool. Is there some way that a CI task could be set up
to automatically publish new versions?

On Sat, May 24, 2014 at 5:03 PM, Carter Schonwald
<[hidden email]> wrote:
> i'd totally support making this prominently visible  on haskell.org
>
>
>
> On Sat, May 24, 2014 at 2:58 AM, Kevin Nardi <[hidden email]> wrote:
>>
>> +1
>>
>> This is really awesome, and definitely would have made my life easier the
>> first time I installed GHC.
>>
>> -Kevin
>>
>> On May 23, 2014, at 11:56 PM, Adam Bergmark <[hidden email]> wrote:
>>
>> Nice, thanks for doing this!
>>
>> I'll make sure to try this next time i need to install GHC.
>>
>> - Adam
>>
>>
>>
>>
>> On Fri, May 23, 2014 at 8:42 PM, Bob Ippolito <[hidden email]> wrote:
>>>
>>> After seeing some demand for packaged Haskell for Mac for the IHaskell
>>> project and by word of mouth at BayHac I decided to take a stab at it. Here
>>> you go:
>>> http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install
>>> 1.20.0.1)
>>>
>>> Why?
>>>
>>> It can be a bit cumbersome to use the GHC builds from haskell.org on Mac,
>>> because they don't come "fully baked", you have to ./configure
>>> --prefix=/some/path to get them installed and the installation is not
>>> relocatable, if you move it the scripts will break and the package.conf.d
>>> files will go stale. It also doesn't ship with cabal-install, which is
>>> cumbersome as well, especially for new users.
>>>
>>> How does it work?
>>>
>>> In https://github.com/ghcformacosx/ghc-dot-app I have a Main.hs script
>>> which downloads/builds/etc. all of the prerequisites. Then it patches the
>>> shell scripts to use a path relative to themselves (after following
>>> symlinks) rather than hard-coding an installation location. It also patches
>>> the package.conf.d files to use ${pkgroot} relative paths.
>>>
>>> Separately, there's an Xcode project that includes all of the metadata to
>>> make it look like a real Mac app bundle (icons, Info.plist) and a small
>>> Cocoa application that has a button to open the docs and provides
>>> instructions for adding it to the PATH in .bashrc. Due to the heuristics in
>>> Mac OS X's man, this will automatically make man pages work as well. Using
>>> Xcode here also makes it produce a signed build (which I do, since I am
>>> already paying for the $99/year license).
>>>
>>> -bob
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> [hidden email]
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
>

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

Re: Self-contained GHC for Mac

Bob Hutchison
In reply to this post by Bob Ippolito

On May 23, 2014, at 2:42 PM, Bob Ippolito <[hidden email]> wrote:

After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)


Thank you! Wonderful!

I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org

So, Bob, have you thought about how you’ll avoid having to maintain this forever?

Cheers,
Bob

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

Re: Self-contained GHC for Mac

Richard Cobbe
On Mon, May 26, 2014 at 08:23:22AM -0400, Bob Hutchison wrote:

>
> On May 23, 2014, at 2:42 PM, Bob Ippolito <[hidden email]> wrote:
>
> > After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
> > http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)
> >
>
> Thank you! Wonderful!
>
> I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org

Asking purely out of curiosity: what's the advantage to doing this over
using the Haskell Platform installer?  (Other than the fact that the latter
hasn't seen a release in a year, I mean.)

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

Re: Self-contained GHC for Mac

Bob Hutchison

On May 26, 2014, at 9:08 AM, Richard Cobbe <[hidden email]> wrote:

> On Mon, May 26, 2014 at 08:23:22AM -0400, Bob Hutchison wrote:
>>
>> On May 23, 2014, at 2:42 PM, Bob Ippolito <[hidden email]> wrote:
>>
>>> After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
>>> http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)
>>>
>>
>> Thank you! Wonderful!
>>
>> I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org
>
> Asking purely out of curiosity: what's the advantage to doing this over
> using the Haskell Platform installer?  (Other than the fact that the latter
> hasn't seen a release in a year, I mean.)

That’s a pretty good reason :-)

Have a look at this thread “Minimal Haskell Platform” https://groups.google.com/forum/#!topic/haskell-cafe/-MrmFsyq-FM for a lot of discussion. There have been other threads in various mailing lists touching on this recently.

Cheers,
Bob

>
> Richard
> _______________________________________________
> 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: Self-contained GHC for Mac

Bob Ippolito


On Monday, May 26, 2014, Bob Hutchison <[hidden email]> wrote:

On May 26, 2014, at 9:08 AM, Richard Cobbe <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;cobbe@ccs.neu.edu&#39;)">cobbe@...> wrote:

> On Mon, May 26, 2014 at 08:23:22AM -0400, Bob Hutchison wrote:
>>
>> On May 23, 2014, at 2:42 PM, Bob Ippolito <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;bob@redivi.com&#39;)">bob@...> wrote:
>>
>>> After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
>>> http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)
>>>
>>
>> Thank you! Wonderful!
>>
>> I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org
>
> Asking purely out of curiosity: what's the advantage to doing this over
> using the Haskell Platform installer?  (Other than the fact that the latter
> hasn't seen a release in a year, I mean.)

That’s a pretty good reason :-)

Have a look at this thread “Minimal Haskell Platform” https://groups.google.com/forum/#!topic/haskell-cafe/-MrmFsyq-FM for a lot of discussion. There have been other threads in various mailing lists touching on this recently.

In addition to that, you can only have one Haskell Platform install and you need admin to install it. With this, you don't need admin and can have as many "installs" as you want (although it won't save you from .ghc or .cabal hell).

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

Re: Self-contained GHC for Mac

Erik Hesselink
On Mon, May 26, 2014 at 5:36 PM, Bob Ippolito <[hidden email]> wrote:

>
> On Monday, May 26, 2014, Bob Hutchison <[hidden email]> wrote:
>>
>> On May 26, 2014, at 9:08 AM, Richard Cobbe <[hidden email]> wrote:
>>
>> > On Mon, May 26, 2014 at 08:23:22AM -0400, Bob Hutchison wrote:
>> >>
>> >> On May 23, 2014, at 2:42 PM, Bob Ippolito <[hidden email]> wrote:
>> >>
>> >>> After seeing some demand for packaged Haskell for Mac for the IHaskell
>> >>> project and by word of mouth at BayHac I decided to take a stab at it. Here
>> >>> you go:
>> >>> http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install
>> >>> 1.20.0.1)
>> >>>
>> >>
>> >> Thank you! Wonderful!
>> >>
>> >> I think this is the way to go for anyone setting up Haskell for the
>> >> first time on a Mac. I agree that this should be a very prominently
>> >> displayed installation option on haskell.org
>> >
>> > Asking purely out of curiosity: what's the advantage to doing this over
>> > using the Haskell Platform installer?  (Other than the fact that the
>> > latter
>> > hasn't seen a release in a year, I mean.)
>>
>> That’s a pretty good reason :-)
>>
>> Have a look at this thread “Minimal Haskell Platform”
>> https://groups.google.com/forum/#!topic/haskell-cafe/-MrmFsyq-FM for a lot
>> of discussion. There have been other threads in various mailing lists
>> touching on this recently.
>
>
> In addition to that, you can only have one Haskell Platform install and you
> need admin to install it. With this, you don't need admin and can have as
> many "installs" as you want (although it won't save you from .ghc or .cabal
> hell).

I have three platforms installed. As long as they have different GHC
versions, there's no problem, I think. Should I be aware of something?

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

Re: Self-contained GHC for Mac

Bob Ippolito
In reply to this post by Bob Hutchison


On Monday, May 26, 2014, Bob Hutchison <[hidden email]> wrote:

On May 23, 2014, at 2:42 PM, Bob Ippolito <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;bob@redivi.com&#39;);" target="_blank">bob@...> wrote:

After seeing some demand for packaged Haskell for Mac for the IHaskell project and by word of mouth at BayHac I decided to take a stab at it. Here you go:
http://ghcformacosx.github.io/ (currently GHC 7.8.2 and cabal-install 1.20.0.1)


Thank you! Wonderful!

I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org

Might be worth waiting a little while to shake out any issues, but I'm ok with that.
 
So, Bob, have you thought about how you’ll avoid having to maintain this forever?

I wrote up instructions for how to build it. Could be done by a CI builder, although it needs someone's signing key to build one suitable for distro. Happy to take it on myself for now as I'm already paying for the Mac developer subscription so might as well use it.

-bob 

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

Re: Self-contained GHC for Mac

Sean Leather-2
In reply to this post by Erik Hesselink
On Mon, May 26, 2014 at 5:38 PM, Erik Hesselink wrote:
On Mon, May 26, 2014 at 5:36 PM, Bob Ippolito wrote:
> In addition to that, you can only have one Haskell Platform install and you
> need admin to install it. With this, you don't need admin and can have as
> many "installs" as you want (although it won't save you from .ghc or .cabal
> hell).

I have three platforms installed. As long as they have different GHC
versions, there's no problem, I think. Should I be aware of something?

And I wrote a script to make it easy to switch between GHC versions:


I haven't used it in a long time, but I expect it should still work.

Regards,
Sean

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

Re: Self-contained GHC for Mac

Yitzchak Gale
In reply to this post by Erik Hesselink
Richard Cobbe wrote:
>>>> Asking purely out of curiosity: what's the advantage to doing this over
>>>> using the Haskell Platform installer?  (Other than the fact that the latter
>>>> hasn't seen a release in a year, I mean.)

Bob Hutchison wrote:
>>> That’s a pretty good reason :-)

There has indeed been an usual delay in the current
HP release. Despite Mark Lentzner's hard work it has
gone way past due. Not a small part of the reason for
that delay was the Mac platform, with all of the problems
introduced by Xcode 5.

It looks like the next HP is finally nearing release though.
It will be based on GHC 7.8.2.

Bob Ippolito wrote:
>> In addition to that, you can only have one Haskell Platform install

Erik Hesselink wrote:
> I have three platforms installed. As long as they have different GHC
> versions, there's no problem, I think.

And no two HP's have every had the same GHC version. So that
should never be an issue.

That said, I think I might prefer having just one HP and then this
new method for other versions of GHC.

What I like most about this is that since it doesn't need to be bundled
with the HP libraries, this installer will be much easier to update
promptly when new versions of GHC are released. So I can get
the best of both worlds - the standard set of HP packages and
versions, plus other versions of GHC that aren't part of an HP
release.

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

Re: Self-contained GHC for Mac

Travis Cardwell
In reply to this post by Bob Ippolito
On 2014年05月27日 00:36, Bob Ippolito wrote:
> In addition to that, you can only have one Haskell Platform install and you
> need admin to install it. With this, you don't need admin and can have as
> many "installs" as you want (although it won't save you from .ghc or .cabal
> hell).

I wrote an article explaining how I install multiple versions and avoid
~/.cabal hell (on Debian Wheezy):

http://www.extellisys.com/articles/haskell-on-debian-wheezy

TLDR: Do not install *anything* into ~/.cabal; essentially just use it to
store the package list and archives, installing the most recent version of
cabal-install into --global and everything else into sandboxes.

Cheers,

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

Re: Self-contained GHC for Mac

Yitzchak Gale
Travis Cardwell wrote:
> I wrote an article explaining how I install multiple versions and avoid
> ~/.cabal hell (on Debian Wheezy):

Thanks for this detailed write up!
I have two comments:

1. When you switch to a different version of GHC using the PATH,
you also need to take into account the cabal command. Normally
you will want to be using the most recent cabal command, but
your procedure will switch you over to whatever version of the
cabal command was shipped with that version of GHC, because
that GHC bin directory now comes first in the PATH.

2. You don't need to have cabal-install installed globally.
All you need is the executable.

To fix these, add the following to your procedure:

1. Create the directory /usr/local/opt/cabal/bin

2. Create a new empty dir, cd into it, and run:

cabal sandbox init; cabal install cabal-install

Copy .cabal-sandbox/bin/cabal to
/usr/local/opt/cabal/bin

[Note: if the cabal bundled with your initial GHC
version is too old to support sandboxes, then
instead do

cabal install cabal-dev; cabal-dev install cabal-install

and then copy cabal-dev/bin/cabal to
/usr/local/opt/cabal/bin
]

3. Add /usr/local/opt/cabal/bin to your PATH, or install
/usr/local/opt/cabal using stow.

4. When you switch to a different version of GHC by
setting the PATH, do this instead of what you wrote:

export PATH=/usr/local/opt/cabal/bin:/usr/local/opt/ghc-7.6.3-2013.2.0.0/bin:$PATH

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

Re: Self-contained GHC for Mac

Travis Cardwell
On 2014年05月27日 19:03, Yitzchak Gale wrote:
> Travis Cardwell wrote:
>> I wrote an article explaining how I install multiple versions and avoid
>> ~/.cabal hell (on Debian Wheezy):
>
> Thanks for this detailed write up!

Thank you very much for the feedback!

> 1. When you switch to a different version of GHC using the PATH,
> you also need to take into account the cabal command. Normally
> you will want to be using the most recent cabal command, but
> your procedure will switch you over to whatever version of the
> cabal command was shipped with that version of GHC, because
> that GHC bin directory now comes first in the PATH.

By always installing the latest version of cabal-install globally, the
most recent cabal command is in the GHC bin directory.  There is no need
to prepend another path onto PATH just for cabal.

Since cabal is an integral part of the GHC toolchain, I prefer this over
having a separate path just for cabal, making PATH (IMHO unnecessarily)
longer.  (Would there ever be a case where GHC/bin is needed while
cabal/bin is not?)

> 2. You don't need to have cabal-install installed globally.
> All you need is the executable.

I have been wondering about this, but I install --global cabal-install
because I was not sure that the corresponding cabal [library] version
might not be expected in some case.  As there are no other dependencies, I
did not worry about it.

I just did a quick test and found that the cabal [library] is not
installed with Haskell Platform; just the cabal-install executable is, as
you suggest.

Thank you for pointing that out to me!  I will update the article soon.

Cheers,

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

Re: Self-contained GHC for Mac

Alexey Muranov
In reply to this post by Bob Hutchison


On Monday, May 26, 2014 2:23:34 PM UTC+2, Bob Hutchison wrote:

I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on <a href="http://haskell.org" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fhaskell.org\46sa\75D\46sntz\0751\46usg\75AFQjCNGewfSNYl0LKG3GaO2xGT2ELcQarA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fhaskell.org\46sa\75D\46sntz\0751\46usg\75AFQjCNGewfSNYl0LKG3GaO2xGT2ELcQarA';return true;">haskell.org

Are there any drawbacks in installing Haskell with Homebrew?

Alexey.

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

Re: Self-contained GHC for Mac

Adam Bergmark-2
I didn't have any problems using HP from homebrew but it installs packages globally which seems to be frowned upon.



On Fri, May 30, 2014 at 2:36 PM, Alexey Muranov <[hidden email]> wrote:


On Monday, May 26, 2014 2:23:34 PM UTC+2, Bob Hutchison wrote:

I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org

Are there any drawbacks in installing Haskell with Homebrew?

Alexey.

_______________________________________________
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: Self-contained GHC for Mac

Christopher Allen
The global package installation is the part I take objection to and it's what causes problems for new people. It's why I was excited about this idea.


On Fri, May 30, 2014 at 1:07 PM, Adam Bergmark <[hidden email]> wrote:
I didn't have any problems using HP from homebrew but it installs packages globally which seems to be frowned upon.



On Fri, May 30, 2014 at 2:36 PM, Alexey Muranov <[hidden email]> wrote:


On Monday, May 26, 2014 2:23:34 PM UTC+2, Bob Hutchison wrote:

I think this is the way to go for anyone setting up Haskell for the first time on a Mac. I agree that this should be a very prominently displayed installation option on haskell.org

Are there any drawbacks in installing Haskell with Homebrew?

Alexey.

_______________________________________________
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



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