Introduction to Functional Programming – Installing GHC and Haste on Chalmers’ student computersTDA555 / DIT440, LP1 2015
Home | Schedule | Labs | Exercises | Exam | About | FAQFire | Forum | TimeEdit | Links
Introduction to Functional Programming – Installing GHC and Haste on Chalmers’ student computersTDA555 / DIT440, LP1 2015
Home | Schedule | Labs | Exercises | Exam | About | FAQFire | 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, but Haste is required for lab 4.

GHC 7.10.2 and Haste are already available on the Chalmers 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.10.2

> hastec --version
0.5.2

If the programs print the above version numbers, everything should work as expected.