Installing GHC and Cabal [Deprecated]
If you are running Linux, macOS (on Intel), FreeBSD or Windows Subsystem for Linux, run the following in your terminal (as a user other than root), then follow the onscreen instructions.
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
For macOS on Apple Silicon, run this instead:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | arch -x86_64 /bin/bash
Check your GHC version and Cabal version by running:
In this tutorial, we are using GHC 8.10.2 and Cabal 184.108.40.206, you can install this version by running:
ghcup install ghc 8.10.2
ghcup install cabal 220.127.116.11
Then set it as the currently "active" GHC and Cabal version:
ghcup set ghc 8.10.2
ghcup set cabal 18.104.22.168
Re-check your current GHC and Cabal version. If it's still not the correct version, try to restart your terminal.