Introduction to Functional Programming – Installing GHC and Haste on the student computers | TDA555 / DIT440, LP1 2014 |
Home | Schedule | Labs | Exercises | Exam | About | FAQ | Fire | Forum | TimeEdit | Links |
Introduction to Functional Programming – Installing GHC and Haste on the student computers | TDA555 / DIT440, LP1 2014 |
Home | Schedule | Labs | Exercises | Exam | About | FAQ | Fire | Forum | TimeEdit | Links |
These instructions give access to the latest version of GHC and also the Haste compiler which we use in lab 4. You are not required to use the latest GHC (you shouldn’t notice any important differences), but Haste is required for lab 4.
GHC 7.8.3 and Haste are already available on the student computers, but in order to get access to them, you need to make sure to have the directory
/chalmers/sw/unsup64/phc/b/binh
in your path. One way to achieve this is to run these commands in a terminal:
echo 'setenv PATH "/chalmers/sw/unsup64/phc/b/binh:"$PATH' >> $HOME/.tcshrc
echo 'export PATH=/chalmers/sw/unsup64/phc/b/binh:$PATH' >> $HOME/.bashrc
Restart the terminal to make sure that the new path is visible.
Note that if you run these commands several times, redundant lines will be added to your ~/.tcshrc
and ~/.bashrc
files. If so, you may want to clean them up afterwards.
Check that the setup works by running
> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3
> hastec --version
0.4.2.1
If the programs print the version numbers 7.8.3
and 0.4.2.1
respectively, everything should work as expected.