Hacking in Haskell

Greg Price (price), MIT Student Information Processing Board

This class met Tuesday, January 29th and Thursday, January 31st 2008 from 7:30 to 9:30 PM in MIT Room 2-431.

Slides from class

Code examples from class

Haskell resources

(Adapted from a version by David Glasser.)


Paul Hudak, The Haskell School of Expression.
An introduction to Haskell using graphics, sound, robot controllers, and so on. Goes from zero knowledge to pretty advanced. (In Barker.)
Simon Thompson, Haskell: The Craft of Functional Programming.
Described as a very clear introduction to the language. (In Barker and SIPB.)
Richard Bird, An Introduction to Functional Programming using Haskell.
An older and a little more mathy intro. (In Barker and SIPB.)


Center of all things Haskell. A wiki, browsable for hours for all sorts of tips, tricks, and sample code.
A compendium of tutorials and the like (e.g., Yet Another Haskell Tutorial.)
A tutorial that walks you through writing a near functionality-complete Scheme interpreter. Very classic thing to do in Haskell.
Hoogle, a search engine for the Haskell library.
HackageDB, a collection of Haskell packages, recent and aiming to be CPAN.
GHC, the principal Haskell compiler and interpreter.
Documentation on the Haskell standard library.
#haskell on the Freenode IRC network
A friendly chat channel which caters both to those writing their first lines of Haskell and those who have deep questions about mathematical typing theory.

Interesting tools and libraries:

XML manipulation in Haskell. Absolutely impossible to generate ill-formed output! Think of it as XSLT but with the power and syntax of a real programming language.
An automatic specification-based testing tool. You tell it some properties some function should have (like, "the result of such and such a test should always be true"), and it randomly generates inputs and pokes holes in all your assumptions. (Ships with GHC as Test.QuickCheck.)
The simple graphics library from Hudak's book, updated and reorganized, now ships with (at least) GHC. Want to draw some pictures quickly? Just use this.
This is a monad-based (not scary! seriously!) parser library that lets you build up parsers from small pieces using higher level combinators; for example, (many1 letter) `sepBy` char ',' parses one or more words separated by commas.