First lets check if we have the xcode developers tools with:
$ xcode-select -p
If the command above dont give you a path then you should do:
$ xcode-select --install
After installing developers tools you can finally install the Homebrew with:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Let's install GHC with Homebrew using the following command:
$ brew install ghc
Now we can verify if it was installed with:
$ ghci
GHCi, version 8.10.1: https://www.haskell.org/ghc/ :? for help
Loaded package environment from /Users/frederick/.ghc/x86_64-darwin-8.10.1/environments/default
Prelude> :q
Leaving GHCi.
At the moment we have installed the compiler but we should install Cabal to allow us to download all dependencies for our codes, this can be done with:
$ brew install cabal-install
$ cabal update
Let's install one dependency: Numbers
$ cabal install numbers
$ cabal install --lib numbers
That's all folks, now we have installed Haskell, enjoy it and code carefully!
In order to use Haskell on VS Code, I personally installed the following extensions:
Hope you find this Gist useful!
Thank you for read it!