Links and Useful Resources


Throughout most of the course, we will use the functional programming language Haskell. In particular, we will use Haskell as a metalanguage for describing programming language concepts. It is therefore absolutely essential that you develop your Haskell programming skills!

To be successful in this course, you will have to consult other Haskell resources and write Haskell programs outside of class (beyond the homework assignments and in-class exercises). The following resources should provide several options.

Installing GHC

The Haskell compiler we’ll be using in this class is GHC. You’ll also need a tool called cabal for installing Haskell packages. The easiest way to install GHC and cabal varies by platform.

On Windows, install Haskell Platform, which includes both GHC and cabal.

On Mac, use Homebrew. First install Homebrew itself, if you don’t already have it on your system. Then install GHC and cabal with the following commands:

> brew install ghc
> brew install cabal-install

On Linux, use whatever package manager is standard on your distribution (e.g. apt on Ubuntu, dnf on Fedora). The cabal package you want is probably called cabal-install. Make sure that the GHC version installed is at least 8.4.

Installing Doctest

Doctest is a useful tool for running examples written in the comments of a Haskell file as unit tests. We’ll use this in some homework assignments.

After you’ve installed GHC and cabal, you can install doctest with the following commands:

cabal update
cabal install doctest

You will probably also need to add the directory that cabal installs its binaries in to your $PATH. Here are my best guesses as to where that will be:

  • Linux: ~/.cabal/bin
  • Mac: ~/.cabal/bin or ~/Library/Haskell/bin
  • Windows: C:\Program Files\Haskell\bin

Haskell Tutorials and Reference Manuals

  • Introduction to Haskell by Brent Yorgey – An excellent, concise introduction to Haskell. I’ll assign reading from this book/tutorial in the first couple of weeks.

  • Haskell: The Confusing Parts – An FAQ especially for folks coming to Haskell from a C/Java background, which I guess is many of the people in this class.

  • Real World Haskell – O’Reilly’s book-length introduction to Haskell focusing on practical applications. Available for free online.

  • Haskell Wikibook – An easy-to-navigate and thorough resource.

  • A Gentle Introduction to Haskell – Famous for being not-so-gentle, but a really great resource for refining your understanding of Haskell, once you get the basics down.

Haskell Style


In the last couple weeks of the course, we will use the logic programming language Prolog. As with Haskell, I strongly recommend you supplement the course material with reading and exercises outside of class.

  • SWI-Prolog – The Prolog environment we’ll be using. I’ll assume you have this installed.

  • Learn Prolog Now! – This book provides a good introduction to Prolog and plenty of exercises for practice. Available for free online.

  • An Introduction to Logic Programming through Prolog – A free older textbook based on Prolog. I haven’t read this one but it looks like a pretty good resource.

  • Prolog Wikibook – Another one I haven’t read, but looks like a pretty good resource.

Back to course home page