Haskell The Craft of Functional Programming
Simon Thompson
Addison-Wesley
ISBN 0-201-40357-9
http://www.ukc.ac.uk/computer_science/Haskell_craft/
Available in the US and Canada now. In the UK and Europe inspection copies
are available now; bulk copies from towards the end of August.
Named in honour of Haskell Curry, whose work has had a profound influence on
functional programming, the Haskell language is growing rapidly in popularity,
especially as a vehicle to teach introductory programming concepts. This book
introduces Haskell at a level appropriate for those with little or no prior
experience of functional programming. The emphasis throughout is on crafting
programs, solving problems and avoiding common pitfalls. In three parts the
book
* first builds a foundation, focusing on programming basic types and lists,
using first-order, non-polymorphic programs
* then looks at the three ideas of higher-order functions, polymorphism and
type classes, which together give modern functional programming its
distinctive flavour and power
* finally discusses larger-scale programming, supported by an exploration
of user-defined types, modules, lazy evaluation and IO programming using
monads.
Further details including full contents and preface, source code and other
resources can be found at the URL given above.
Features
^^^^^^^^
Amongst its features are
* an analysis of program behaviour and efficiency
* a strong emphasis on software engineering and problem-solving techniques
* an optional thread on proving that programs have the properties required
of them which runs through the text
* software modification and re-use are emphasised in the discussion of
design issues
* design advice is supplemented with examples and case studies of varying
size and complexity
* appendices contain support material of various kinds - pointers to sites
from which implementations of Haskell and Gofer can be obtained; common
error messages; a glossary of programming terms; functions from parts of
the Haskell standard preludes; and more
* over 400 exercises of varying difficulty
Haskell systems
^^^^^^^^^^^^^^^
* the text is designed to be used with any Haskell implementation, such as
Hugs (Haskell Users Gofer System) whose interface and error messages are
described in some detail.
* the material takes account of the latest revision to the language
definition, Haskell 1.3.
* the text can also be used with the Gofer system.
* Code for the functions defined in the text is available from the WWW site
http://www.ukc.ac.uk/computer_science/Haskell_craft/
Contents in brief
^^^^^^^^^^^^^^^^^
Part I Basic Functional Programming:
Introducing functional programming. Basic types and simple programs. Reasoning
about programs. Data structures: Lists. Reasoning about lists.
Part II Abstraction:
Generalization. Functions as values. Classes in Haskell. Checking types.
Part III Larger-Scale Programming:
Algebraic types. Case Study: Huffman codes. Abstract data types. Lazy
programming. Input/Output and interaction. Program behaviour.
Appendices:
A: Functional and imperative programming. B: Further reading. C: Glossary. D:
Understanding programs. E: Haskell operators. F: Implementations of Haskell. G:
Gofer and Hugs errors. H: Some useful functions. Bibliography.
25 July 1996