Software
This course will make use of the following software:
Operating system: Linux and MacOS will work right out of the box. Windows users will require WSL2.
GHC and Cabal: the Haskell implementation and a package manager for Haskell code.
Instruction for using each system are below:
1 Using Unix-like OSs (Mac and Linux)
You should be able to use GHC-Up, which is a tool for installing the Haskell compiler and it’s associated tools.
For this course we will be using GHC version 9.0.2, but any version 9.* version should work.
This link explains how to install a specific version of GHC.
The GHCUp tool will ask you some questions about whether you want additional tools (like the language server implementation, which may or may not be useful depending on whether you use VSCode). The defaults should be fine, as long as you have the following tools after installation:
ghc
ghci
cabal
2 Using Windows
It is possible to use GHC without WSL, but unless you’re confident with Windows development and powershell, I would use WSL2. If you are confident, you can read the GHC-Up guide for how to use it in Windows Powershell.
Here is a breakdown of the steps:
Following the instructions at this link, install a Linux Distro of your choice (e.g., Ubuntu). The instructions include a suggestion to upgrade to WSL2; this is not necessary but will improve efficiency in general.
Open your installed Linux distribution of choice and make any initial configurations necessary (user, pass, etc.). Run sudo apt update and follow with sudo apt upgrade. These two may take some time.
Follow the instructions for the Using Unix-like OSs (Mac and Linux) section in order to install GHC
Regardless of the IDE used, you can now run your tests from your Linux subsystem by entering the project directory and using GHC + Cabal.