Home  |  
Style  |  
Sitemap  |  
Svenska  |  
Lund University
 

Programming Environment

For all programming exercises and assignments you will use GHCi, the interpreter part of the Glasgow Haskell Compiler system. You may need to access the user manual.

You can install GHC and GHCi on your own computer from here. Test your installation by creating a new file Test.hs containing the code

module Main where

main = putStrLn "Hello, world!"

Load the file and type main at the GHCi prompt. You should get the response "Hello, world!".

To use GHCi on the Linux student systems run the initcs script (actually, not necessary for a bare ghci) and then type ghci at the prompt. You should get version 6.12.3 of ghc.

 

Even though there is a newer version of GHC (7.x) available (introducing some important changes - make sure to run it in compatibility mode in case you develop your code with it) we stay with 6.12.3 as the official one for our Linux distribution. This may change in the future.

 

Editing Haskell files can be done by any text editor. For those favouring Emacs there is a haskell-mode which automatically handles indentation and syntax colouring. There is also a haskell mode definition for the Vim editor.

Page Manager: Jacek Malec
Webmaster: webmaster@lth.se
Last updated: 2011-11-29