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

  1. 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.
  2. Now click on the Start button.
  3. Under Settings, click on Control Panel.
  4. Click on the System icon.
  5. Click on the Advanced tab.
  6. Click on Environment Variables button
  7. 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.
  8. 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.
  9. Click OK to exit System Properties
  10. Close the Control Panel
  11. Restart your computer
  12. Test your installation by opening a DOS command window to check that both the ghci and ghc commands are recognised.

Notes

  1. 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.
  2. 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