Setting up Haskell
1 On CSE Machines
In order to avoid build troubles, and to make sure everyone is using
the same set of dependencies, we have set up a recent version of
GHC and associated tools in the course
account. To use it, type 3141
into a CSE terminal:
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.2 $ 3141 newclass starting new subshell for class COMP3141... $ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.2.2
For the assignments and exercises, the cabal
build tool is available and has
been configured to work with a shared package database for all COMP3141
students. Be sure to follow the CSE
instructions if you want to use it.
2 Haskell for Mac
Note: For Mac users, we recommend Haskell for Mac, available on the Mac App Store. You can obtain a free license key from the lecturer in charge.
All assignments and exercises will come with build instructions. If you are
using this setup, follow the instructions for HfM
users.
Alternatively, if you prefer to make use of command-line tools, you can follow the same instructions as for other users, below.
3 Command-line tools
We recommend installing the
stack
build tool for Haskell. Once this is done, the entire compiler toolchain
can be installed just by typing stack setup
. This should work on Linux,
Windows and Mac. Alternatively, the compiler
and toolchain can be installed from distribution package managers on Linux,
but these are often out of date or configured incorrectly.
All assignments and exercises will come with build instructions. If you are
using this setup, follow the instructions for stack
users.