COMP1100 Introduction to
Programming and Algorithms
Semester 1, 2008
Extra Advice on Installing and Using GHC
under Windows
Where do I get the Glorious Glasgow Haskell
Compiler?
To get Haskell on your home computer, you can download GHC from the Haskell web site. GHC 6.8
is the latest release version, but our local installation is currently
version 6.4.1.
Once you have successfully installed the GHC, there is still some work
to do. Read on ...
Setting the PATH on Windows XP
- First you need to find where ghc has been installed.
It should be somewhere like C:\ghc\ghc-6.4.1\. Your
version number will probably be later than 6.4.1. There
will be a bin subdirectory. Take note of the path.
- Now click on the Start button.
- Under Settings, click on Control Panel.
- Click on the System icon.
- Click on the Advanced tab.
- Click on Environment Variables button
- Highlight PATH in the top panel and click the
Edit button.
Don't change what's there - you are going to
add to the PATH value.
- Edit the PATH so it ends with
C:\ghc\ghc-6.4.1\bin;
(or whatever path you found it
on above) and click OK.
You have now set your PATH variable to find
ghci and ghc commands at the DOS prompt.
- Click OK to exit System Properties
- Close the Control Panel
- Restart your computer
- Test your installation by opening a DOS command window to check that
both the ghci and ghc commands are recognised.
Notes
- When you install GHC on your MS Windows system, it will probably
put a ghc launcher in the Programs menu.
Do not use it! It is much more sensible to open a DOS
command window, navigate to the working directory and start
ghci from the command prompt.
- When using the ANU Graphics package ghc and
ghci need to be started with the
-fglasgow-exts flag. This is not possible from the
ghc launcher in the Programs menu, so
you need to set up the PATH variable as outline
above and start it from the DOS command prompt.
Last modified: Tue Mar 25 15:56:44 EST 2008