Advanced Functional Programming in Haskell
This page is based off the teachings of Professor Graham Hutton, University of Nottingham. He has approved the creation of this page and usage of his resources.
Last updated
This page is based off the teachings of Professor Graham Hutton, University of Nottingham. He has approved the creation of this page and usage of his resources.
Last updated
This is an advanced course on functional programming in Haskell. It is designed for second year computing students in Nottingham, but the lectures are also made available on .
The course is based on part II of . It is recommended for following the course, to purchase the below textbook, watch the youtube videos, slides are provided below to follow along, and then to try out to programming examples with resources below as well. All resources and links are provided at the bottom of the page. All credit goes to the , University of Nottingham
The course expands beyond the basics into advanced patterns, type classes, and program reasoning. Key lectures include:
Course Overview 2β4. Sudoku Solver Series β Building and optimizing a Sudoku solver in Haskell 5β6. Functors & Applicative Functors 7β10. Monads β From basic introduction to generic laws and use cases (Maybe, List, State) 11β12. Program Reasoning & Induction 13β15. Performance & Compiler Correctness β Techniques like fast reverse/flatten and verifying compiler behavior
Plus: YouTube playlists, overview slides, Sudoku solver code, and full standard prelude reference
Use it as your central hub for videos, slides, and example code.
Watch in orderβeach builds on the previous one:
Lectures 2β4: Code a Sudoku solver from scratch, iteratively improving performance
Lectures 5β10: Deep dive into functors, applicatives, and monadsβincluding real-world monad usage in Haskell
Lectures 11β12: Learn how to formally reason and prove properties about functional programs
Lectures 13β15: Tackle efficiency (e.g., removing append overhead) and understand compiler verification
Highly aligns with the course. Reading alongside lectures reinforces:
Category-theoretic intuition behind functors/applicatives/monads
Inductive proofs and reasoning
Lazy evaluation optimizations
Download and run the Sudoku solver code provided
Tinker with functor/applicative/monad instancesβmaybe create a small parsing program or build a custom monad
Implement the "fast reverse" or "fast flatten" strategies using difference lists
Walk through the compiler correctness lecture by experimenting with simple interpreters or compiling toy expressions
Use induction and reasoning techniques shown in lectures 11β12 to validate your programs
Explore equational reasoning (e.g., proving map fusion or monad laws)
Editor β VS Code with Haskell extensions, or your preferred Haskell IDE
Hoogle β invaluable for searching type signatures and library functions
YouTube β study at your pace; pause and rewind where needed
Type everything by hand even if slides include code
Pause frequently during monad sectionsβthese can be non-trivial
When reasoning, write proofs step-by-step in your notes or code comments
Use Git to version control your solutions (especially for the Sudoku solver or monad experiments)
Advanced topics youβll be ready for next:
Category theory applied to Haskell (e.g., Profunctors, Arrows)
Concurrency and streaming libraries (e.g. Conduit, STM)
Formal verification tools (e.g., Liquid Haskell, Agda)
Additional material:
GHC β install via
()
(internal version of this page)
(for all things Haskell)
(the Glasgow Haskell Compiler)
(for searching the libraries)