Tuesday, June 4, 2019

Installing Haskell on a Mac

I'm not going to tell you how to install any Haskell implementation on any box.  I'm just going to help you a little bit by telling you what I did to install ghc on my Mac.

Basically, I followed these instructions.

What this amounts to is running this curl script:

$ curl -sSL https://get.haskellstack.org/ | sh

Towards the end, it asks for permission to "sudo" in order to install to /usr/local/bin and you need to give your password.

In order to do the code generation, it needs you to carry out two additional steps, which it informs you about towards the end of the installation:

$ xcode-select --install
$ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

And then you need to run the compiler at least once to download the latest version and so on:

$ stack ghc

No comments:

Post a Comment