COMP[39]161 Concepts of Programming Languages
Semester 2, 2018

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 will 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 a recent version of GHC and associated tools in the course account. To use it, type 3161 into a CSE terminal:

$ ghc --version 
The Glorious Glasgow Haskell Compilation System, version 7.6.2
$ 3161
newclass starting new subshell for class COMP3161...
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.2.2

For the assignments, the cabal build tool is available and has been configured to work with a shared package database for all COMP3161 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.

2018-11-16 Fri 19:37

Announcements RSS