Programs from

Haskell: The Craft of Functional Programming, Second Edition


The Haskell code from this text can be downloaded from here. It is divided into chapter-size scripts, except when this proves to be too unwieldy, when they are further subdivided.

These scripts are supplied so that you can execute the programs in the book; the comments that they contain are not intended to be a substitute for the commentary which appears in the text itself.

Scripts are provided in both literate (Foo.lhs) and non-literate (Foo.hs) forms. In literate scripts all code occurs on lines like

>       dummy = dummy
Sometimes, however, in literate scripts code appears which is just indented, without the >: this is when the code acts as a comment on the script.

Dummy definitions like the one above are included in some of the scripts. This happens when the definition is left as an exercise for the reader. For these scripts to work properly you need to add the appropriate definitions to the script. All the scripts are contained in the files Code.tar.gz (Unix) and Code.ZIP (PC).

Scripts chapter-by-chapter

Case studies


© Simon Thompson, 1999.

Last modified 31 January 2001.