Setting up Haskell
1 On CSE Machines
GHC and the build-tool cabal
are already set up on CSE machines, but they
are not configured correctly and may fail to build your assignments.
In order to avoid build troubles, and to make sure everyone is using the same set of dependencies, we have set up an appropriate version of GHC and associated tools in the course account. To use it, type 3141
into a CSE terminal:
$ 3141 newclass starting new subshell for class COMP3141...
For the assignments, the cabal
build tool is available and has been configured to work with a shared package database for all COMP3141 students.
2 Home machine
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.
Typing stack repl
should open ghci
and stack exec ghc
can be used to
run ghc
.
All assignments and exercises will come with build instructions. If you are
using this setup, follow the instructions for stack
users.