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.)

Books:

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.)

Online:

haskell.org
Center of all things Haskell. A wiki, browsable for hours for all sorts of tips, tricks, and sample code.
haskell.org/learning.html
A compendium of tutorials and the like (e.g., Yet Another Haskell Tutorial.)
en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
A tutorial that walks you through writing a near functionality-complete Scheme interpreter. Very classic thing to do in Haskell.
haskell.org/hoogle
Hoogle, a search engine for the Haskell library.
hackage.haskell.org/packages/archive/pkg-list.html
HackageDB, a collection of Haskell packages, recent and aiming to be CPAN.
haskell.org/ghc
GHC, the principal Haskell compiler and interpreter.
haskell.org/ghc/docs/latest/html/libraries
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:

HaXml
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.
QuickCheck
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.)
HGL
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.
Parsec
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.