AFP - Compilers, Manuals and Tutorials
The language we will use is called Haskell (after the
logician Haskell B Curry), which was developed by a committe in the
beginning of the 90's.
Compilers & Interpreters
There are a number of compilers and interpreters for Haskell. The
following ones have particular interest for us in this course:
- hbc
- is a compiler developed at Chalmers, by Lennart Augustsson and Thomas Johnsson. This is currently
the only compiler that can be used for fudget programs. It runs under Unix, on a
large number of platforms.
- Hugs
- is an interpreter written in C by Mark Jones.
It is very convenient for prototyping since it parses and
type-checks quickly. It does not implement the module system,
but has so called constructor classes. There are versions for
Unix as well as PC/MSDOS.
- Gofer
- is both the name of an interpreter and a language, also by Mark
Jones.
Gofer is
similar to Haskell, but Mark Jones has added some interesting
features, and omitted some. Runs on Unix / PC / Macintosh.
- ghc
- is a compiler developed by a team at Glasgow. Currently, it
compiles slower than hbc, but the final code runs faster. It has
a number of extensions to the Haskell language, such as parallel evaluation, monadic
I/O, and the state transformer monad that John Launchbury's DFS
algorithm has been implemented with.
There are other interesting languages too, which I don't plan to use
in the course, but you might want to check them out anyway:
- Clean
- is developed on Macintosh by a group at Nijmegen University. It
is possible to write "real
programs" with graphical user interfaces etc on Macs using Clean.
- Erlang
- is an
untyped, strict functional language developed by Ericsson. It
supports concurrency, real time programming and error handling
(features which might be good to have when programming telephone
exchanges).
- The comp.lang.functional FAQ
- has more stuff about various implementations.
Reference Manuals and Tutorials
Manuals
- Haskell
Report.
- defines the language. Don't use it to learn the language, but as a
reference. Many of the features of Haskell are put in the Standard
Prelude as datatypes, classes and functions. The report includes a
description of this.
- Haskell Library Report.
- defines the standard libraries. Functions in these libraries can be used
only if the module they appear in is explicitly imported, but all
implementations provide these modules. Many functions which were
previously a part of the prelude (always available) have now moved into
libraries. This version is a working draft, so subject to change.
- Haskell B. user's manual
(Lennart Augustsson)
- describes hbc, in particular various handy
flags that can be given to the compiler and the executables for
doing heap profiling, for example. Also describes the hbc
library, a number of useful functions that are not in the
Standard Prelude.
Tutorials
- A Gentle Introduction to Haskell
(
Paul Hudak and Joseph
Fasel), and
- The
Little Haskeller
(John Hughes and Cordelia
Hall),
- are two tutorials on Haskell. The latter uses
hbi, which is an interpreter accompanying
hbc. Beware that these tutorials cover Haskell 1.2, whereas we are
actually using the latest revision of the language, Haskell 1.3.
- Functional Programming
(Jeroen Fokker)
- is based on Gofer, and is inspired by Bird and Wadler's book
(see below).
- Programming with
Fudgets
(Thomas Hallgren and
Magnus Carlsson)
- describes stream processors and the fudget
library. There is also a reference manual
on line about fudgets.
- An Introduction to Gofer
(Mark Jones)
- is the Gofer language reference, and is also a
good introduction.
The student reception has a number of bundled copies from last
year's course, containing various selections from the papers above. The
reception's copies of "The Little Haskeller" also includes "An Introduction to
Gofer" (but without release notes).
There is also the book Introduction to Functional Programming (Richard
Bird and Philip Wadler),
from Prentice Hall. Uses the language Miranda which is one of the precursors
to Haskell. The book emphasises mathematical techniques for reasoning about
and deriving programs from their specification.
Another good reference is J. Jeuring & E. Meijer (Eds.): Advanced
Functional Programming, LNCS 925, Springer Verlag, 1995.
Back to AFP
26 Oct 1999 19:51
John Hughes