Personal tools

Haskell in education

From HaskellWiki

Revision as of 15:02, 15 May 2006 by Per (Talk | contribs)

Jump to: navigation, search

This is a collection of material of interest to those teaching or taking courses that use Haskell. There is also a more general site,, devoted to all functional languages. The proceedings of the latest International Workshop on Functional and Declarative Programming in Education (FDPE) are now available. Some of the lecture notes and other course material found in these web pages are excellent supplements to the available text books. If you would like to use lecture notes, assignments, or other material found in these course web pages please contact the author for permission.

Most of the entries are years old. When you add your own new material to this page, please also say when the course was run for the last time.

The results of a survey of university courses using Haskell in the academic year 2005-2006 can be found here.


1 Haskell as a first language

These courses teach Haskell to students with no background in programming.

Instructor: Rex Page University of Oklahoma
Course: Introduction to Computer Programming
Student background: High-school mathematics
Materials: Projects, Exams, Downloadable textbook: Rex Page, "Two Dozen Short Lessons in Haskell"
Web page:


These materials arose from a course offered for three consecutive semesters as an alternative to our usual first course in programming. Most of the students who took the course graduated in the past two years, and many of them cited it in the exit interview with the department chair as the most influential course in the entire academic career.

All materials for two offerings of the course are available through the web page. This includes individual projects, team projects, project solutions, exams, supplied software (connected with certain projects), tips for students taking the course, FAQs addressing questions that students asked during the semester, and a short textbook which served as the primary text in the course.

The first 10 to 11 weeks of the course use Haskell. Students are required to write nine programs in Haskell, three of which are team projects that combine software developed in individual projects. Different members of a team are assigned different individual projects, and the team efforts combine their solutions into a working piece of software.

In the early part of the course, students use operators like map, foldr, zip, and iterate to express computations. Explicit recursion is introduced after some experience with these common patterns of computation. Examples and problems address non-numeric applications, for the most part. Both interactive and file I/O are covered, but general purpose monads are not.

The last 5 to 6 weeks of the course use C, and most of the projects in that part of the course duplicate the function of earlier pieces of software that the students have written in Haskell.

Instructor: Jonathan Hill Oxford University Computing Laboratory
Course: Functional Programming for the Integrated Graduate Development Programme in Software Engineering at Oxford University.
Student background: Discrete mathematics (the course is a part time MSc for people from industry; most are from IBM or Nortel).
Materials: Gofer (an old version, with a stripped down prelude---no parameter classes!); Own course material
Web page:

Instructor: Graham Hutton Department of Computer Science, University of Nottingham
Course: Functional Programming
Student background: None
Materials: Hugs 1.3; Richard Bird, Introduction to Functional Programming using Haskell (second edition), Prentice Hall, 1998. Handwritten slides and exercises; copies available on request.
Web page:

Instructor: " Jan Prins UNC Chapel Hill
Course: Introduction to Functional Programming
Student background: solid background in high-school science and mathematics
Materials: Hugs 1.4 incl. Active Haskell, FRAN and Haskore; Simon Thompson, "Haskell: The Art of Functional Programming"
Web page:

(Introductory programming course for CS and math/science majors, typically Freshman and Sophomores. Class size ~60) Our undergraduate computing environment is now largely PCs running Windows NT. We use NTEmacs as the programming environment with a slightly modified version of Emacs hugs mode with hugs running as a subprocess. The combined hugs/NTEmacs/Active Haskell distribution (available through course home page) is installed on 400+ public Win NT machines on campus and some unknown number of student-owned Win 95/98 machines. This arrangement is new this semester, but so far has been working well. Keystroke-oriented interactive applications may be problematic with hugs running in NTEmacs shell mode. I'm planning assignments using Fran and Active Haskell and will try teaching the "brief introduction to imperative programming" at the end of the class using monads. I would be interested in talking with anyone who has experience or suggestions along these lines. I took a cue from Paul Hudak and others and have occasional appearances of MS Agents during lectures to wake students up! This is my first time teaching this course, and I would enjoy talking to others teaching at a similar level. A cursory search on the web didn't reveal many courses in this category.

Instructor: David Sands University of Gothenburg & Chalmers University of Technology
Course: Programmering för Naturvetare
Student background: New students
Materials: hugs 1.4; Simon Thompson
Web page:

This is the first part of a first course in programming. About 16 lectures, each 2x45 mins plus weekly exercise classes and three assessed programming exercises. Most of my materials are in English.

Instructor: Marcos A Rodrigues The University of Hull, Hull, UK
Course: Functional and Logic Programming
Student background: none
Materials: hugs 1.4; Haskell: the Craft of Functional Programming. Thompson S., Addison Wesley, 1996.

Instructor: Torsten Grust University of Konstanz (Germany)
Course: Deklarative Programmierung (Declarative Programming, in german)
Student background: basic math, no programming background required
Materials: Hugs 1.4; (~300) slides available from the course web page; Jeroen Fokker's classroom text: Functional Programming</a>; Richard Bird, Phil Wadler: Introduction to Functional Programming; Simon Peyton-Jones: Implementation of Functional Programming Languages
Web page:

The course is in German only (sorry about that). It additionally features an introduction to logical programming and Prolog.

Instructor: Richard Buckland University of New South Wales
Course: Computing 1A
Student background: Mixed, some have no computing background. This is our cs1 subject.
Materials: Hugs 1.4; Simon Thompson
Web page:

Instructor: Robert Giegerich, Stefan Posch, University Bielefeld, Germany
Course: Introduction to Computer Science
Student background: Completed High School (Abitur)
Materials: Hugs; Class Notes by Robert Giegerich and Ralf Hinze

Our first semester course uses Haskell as a vehicle to fundamental aspects of computation: algorithmics, specification and verification, efficiency analysis, programming methods. This works wonderfully. We do not require previous or additional programming experience. Haskell is quickly learned, to the necessary degreee; we make no attempt to cover the full language. This is NOT a Haskell course! Haskell allows us to speak about concepts of computer science WITHOUT a lot of language learning. And Haskell even helps to keep out detrimental habits from previous programming experience, as well as motivational problems resulting from the widely differing previous experiences of our incoming students.

Instructor: Håkan Jonsson Luleå University of Technology, Sweden
Course: SMD001, functional programming
Student background: None. This is the very first programming course our students take.
Materials: Materials: Simon Thompson's Haskell book + 7 laboratory/programming assignments using Hugs.
Web page: (mostly Swedish)

Instructor: [ Clem Baker-Finch, Australian National University
Student background: No programming background was assumed.
Materials: Based on Haskell 1.3; Hugs; Simon Thompson 1st ed.
Web page:

The forces of evil (the O-O crowd) prevailed in the programming languages argument and it hasn't been taught since.

Instructor: Lyndon While The University of Western Australia
Course: Foundations of Computer Science
Student background: None
Materials: hugs 98; Thompson.
Web page:

2 Haskell as a second language

These courses teach Haskell to students that have already learned another language.

Instructor: Rex Page University of Oklahoma
Course: Discrete Mathematics
Student background: High-school mathematics, introductory programming course (any language)
Materials: Lecture notes, Projects, Exams, Solutions, Proof checking tools, etc.; text: Hall and O'Donnell, "Discrete Mathematics with a Computer"

Web page:

Lecture notes comprise over 350 animated slides (all both PowerPoint and PDF formats). About two-thirds of the material centers around mathematical logic. After the introduction of predicates, all of the examples in the logic portion of the course involve reasoning about properties of software, most of which is expressed in Haskell (a few are conventional looping functions).

Software examples include sum, sequence concatenation, logical operations on sequences, the Russian peasant algorithm, insertion and lookup in AVL trees, and other computations. Most of the properties verified relate to aspects of program correctness, but resource utilization properties are also verified in some cases. Several semesters worth of exams (finals and exams given during the term) are provided. The slides have matured through several offerings of the course.

The remaining third of the course discusses other standard topics in discrete mathematics, such as sets, functions, relations, trees, and counting. The web page provides access to a preview of the material. Exams and solutions are protected by a login procedure (to increase the comfort level of instructors wishing to use them in courses). The web page provides a link through which instructors may gain access to the full website.

Instructor: Jose Emilio Labra Gayo, Dept. of Computer Science (EUITIO) University of Oviedo
Course: Logic and Functional Programming
Student background: The course is oriented towards third year undergraduate students in computer science. Usually, the students have been introduced to imperative languages like Pascal and Object Oriented Languages like C++
Materials: Hugs; R. Bird "Introd. to FP using Haskell" (2nd Ed), J. E. Labra Gayo. "Introduction to the Haskell Language" (in spanish).
Web page: (in spanish).

My FP page:

Instructor: Fritz Ruehr Willamette University, Salem, Oregon, USA (a small Liberal Arts College, about 1 hour from Portland & OGI)
Course: CS 451 Topics in Computer Science: Functional Programming
Student background: Data structures (I may also have required discrete math)
Materials: Hugs 1.4 beta (I also taught Scheme); Haskell: The Craft of Functional Programming by Simon Thompson (I also used my own on-line lecture notes and labs and Kent Dybvig's text on Scheme)
Web page:

The notes and labs I have on-line are in pretty rough form: many slide points are just one-line topical stubs I used as reminders in lecture. Many of the on-line materials are not linked into the (out of date) home page. I hope to have the course approved for next Fall as a regular offering (i.e., not as a "special topic") and should have more extensive on-line materials up by then. Teaching "bi-lingually" in Haskell and Scheme seemed like a good idea at the time, but next time around I will use Haskell as the main vehicle, perhaps taking some time near the end of the course to highlight some other languages (Scheme, ML, Clean). Some of my students used Conal Elliot's Fran and Paul Hudak's Haskore and liked them a lot; I was nice to have some significantly-sized applications that seemed more practical and fun to show off at the end of the course (I should have demonstrated these things at the beginning of the course to help with motivation). Next time around I would like to have a "beginner's prelude" or similar available to avoid problems with classes in type inference, Int vs. Integer, etc. These problems were a constant annoyance during lectures.

Instructor: John Hamer, University of Auckland
Course: Logic and Functional Programming
Student background: Year 2 programming + some discrete maths
Materials: Hugs 98, Haskell School of Expression, Page "Two Dozen Short Lessons in Haskell",
Web page:

Instructor: Hamilton Richards, University of Teaxs at Austin
Course: CS307 Foundations of Computer Science
Student background: (1) A score of at least 560 on the SAT II Subject Test in Mathematics Level I or Level IC, or a score of at least 530 on the SAT II Subject Test in Mathematics Level IIC, or a grade of at least C in Mathematics 305G (pre-calculus); (2) One year of programming in high school, or a grade of at least C in CS 304P (an introductory course that does not count for credit towards a CS degree), or consent of instructor.
Materials: Hugs 98; Simon Thompson, Haskell: The Craft of Functional Programming.
Web page:

Students who succeed in this course are well prepared for the rest of our CS curriculum, which is more theoretical than most.

Instructor: Chris Lengauer University of Passau
Course: Functional Programming
Student background: two years of CS study
Materials: hugs; Richard Bird's new text (PHI)
Web page: not reachable from outside Passau

Instructor: Conrad Cunningham University of Mississippi
Course: Functional Programming
Student background: official -- senior or graduate standing; actual -- introductory programming, data structures, and discrete math
Materials: Hugs on Unix and MS Windows systems; Mostly use the instructor's own set of lecture notes. Also Simon Thompson's HASKELL: THE CRAFT OF FUNCTIONAL PROGRAMMING. Previously used the Bird and Wadler textbook
Web page:

Although I am not a researcher in FP, I enjoy teaching the FP course. Most of the students take to the course after a few weeks. Hugs works reasonably well, but, of course, more pedagogically oriented error messages and other support tools would be helpful.

Instructor: Gary T. Leavens, Iowa State University
Course: Programming Languages 1
Student background: undergraduate course in compilers or programming languaages
Materials: Hugs 1.4; Thompson's Haskell: The Craft of Programming
Web page:

Be sure to tell your students how to debug programs.

Instructor: John O'Donnell University of Glasgow
Course: Functional Programming
Student background: Programming (in Ada), Algorithmic Foundations
Materials: Hugs; Simon Thompson's book on Haskell
Web page:

Instructor: Olaf Chitil, RWTH Aachen, Germany
Course: Functional Programming in Haskell
Student background: basic programming skills (not necessarily in a functional language)
Materials: Hugs 1.4; Hugs user manual, slide copies; additionally the `Gentle Introduction to Haskell', probably Bird's `Introduction to Functional Programming using Haskell' in the future.
Web page: (in German)

The course starts with 4 full time days of learning Haskell. During the semester the students (in groups of 2 students) have to implement a compiler and an abstract machine for a simple imperative language. They are given parts of the system and a manual on how to do the remaining parts (they have no prior knowledge on compiler construction). The most difficult construct for students to understand is the monad. I introduce IO without mentioning monads. Later I explain how to build a simple exception handling system based on the type `Maybe a' / `Error a'. Only subsequently I give the general definition of monads and present the list monad and a simple state monad. However, I fear that just to understand the bind operator `>>=' requires people to be quite comfortable with higher-order functions.

Instructor: Richard Bird, Oxford University
Course: Functional Programming
Student background: Elementary structured programming
Web page:

Instructor: Paul Hudak, Yale University, Dept of Computer Science
Course: Functional Programming
Student background: at least one programming course
Materials: Hugs; my own textbook, which is under preparation
Web page: none

Instructor: Alex Ferguson University College Cork
Course: Functional and Logic Programming
Student background: Final year undergraduate
Materials: Final year undergraduate Materials: Hugs 98; ghc; Simon Thompson, "Haskell: The Craft of Functional Programming" (2nd ed.)
Web page:

This is the declarative programming option for 4th year undergrads, who have Java as a first programming language, and some knowledge of C and C++. The current final year have had some exposure to Haskell in first year, though this is no longer the case for our current intake.

Instructor: Leif Kusoffsky, Royal Institute of Technology, Stockholm
Course: Functional Programming 2D1370
Student background: The course is oriented towards third year undergraduate students in computer science. The students have been introduced to imperative languages like C and Object Oriented Languages like Java
Materials: Hugs; Hudak : The Haskell School of Expression

Instructor: Jeremy Bobbio -- INSIA
Course: Functional and Logic Programming
Student background: One year CS
Materials: Hugs, GHC, Paul Hudak's Haskell School of Education
Web page: (french)

3 Comparative programming languages

These courses teach general programming language principles, with Haskell as an example of a functional language.

Instructor: Ruediger Marcus Flaig, University of Heidelberg (Germany)
Course: An introduction to programming in bioinformatics
Student background: different, but generally low
Materials: Hugs-98 and lots of other stuff
Web page:

This course is designed to introduce life science students, that is to say, going-to-be biologists, physicians, biotechnologists and maybe others, to solving real-life problems (such as DNA sequence handling and analysis). Emphasis will be on paradigms (imperative / OO, functional, declarative). Although -- in order not to frighten people -- the official announcement mentions only Python, Haskell will be presented as THE purely functional language, and all solutions may be presented in either Python, Haskell or Java. I am very curious about the feedback I'll get, and maybe next term we shall focus more on Haskell. What I'd really need, though, is some life science related package for Haskell, such as BIOPYTHON and BIORUBY.

Instructor: Hamilton Richards, University of Texas (Austin)
Course: Programming Languages
Student background:
Materials: Hugs 1.4; Sethi, Davie.
Web page:

I'm using Haskell in a programming-languages course, but it's distributed somewhat piecemeal through the course. Probably adds up to something like 3-4 weeks (out of 15).

Instructor: Mark Utting University of Waikato (New Zealand) Course: Programming Languages
Student background: Two years of C++ and 1 year of Haskell
Materials: Textbook "Programming Languages", Louden. Web page:

The course covers at least two languages in each of the main paradigms (object-oriented, functional and logic programming), plus history, semantics and implementation issues. The Haskell section is about 2 weeks long and usually focusses on programming with higher-order functions and how that enables the language to be extended in application-specific ways (parser combinators, html-generation combinators etc.)

4 Advanced functional programming using Haskell

These courses deal with the advanced issues such as semantics, type systems, or compilers. Includes a other advanced courses taught using Haskell.

Instructor: John Hughes Chalmers University, Gothenburg