ハッ チ
ハッ チ

Reputation: 21

How do I install Haskell Stack on Mac?

I have followed the instructions to install ghcup on my MacOS by following command:

curl https://get-ghcup.haskell.org -sSf | sh 

But I couldn't install it, it prompted errors like these:

Failed to install, consider updating this script via: ghcup upgrade "ghcup --cache install" failed!

Upvotes: 2

Views: 2961

Answers (2)

Yogendra
Yogendra

Reputation: 382

If you have brew installed, you can use : brew install stack

Upvotes: 0

Nick Tchayka
Nick Tchayka

Reputation: 563

stack and ghcup are two different tools.

You can get stack from this website, which involves running the following command:

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

On the other hand, ghcup is a tool that only installs the Haskell compiler (GHC), which means that you won't be able to build a project using Stack. Note that this last installation comes with a build tool called cabal. You can learn the differences between stack and cabal in this other question.

Regarding your error with ghcup, I'd try to use the instructions from https://gitlab.haskell.org/haskell/ghcup. It is the main repo from the project, and probably updated faster. Note that you can use the "simple bootstrap" process, and if that doesn't work, try the manual one.

Upvotes: 2

Related Questions