Functional Programming (Winter 2024)
General Information
- Lecturer: Prof. Dr. Peter Thiemann
- Assistant: Hannes Saffrich
- Lecture: Tuesday, 14:15 - 15:45, Building 106, SR 04 007
- Tutorials: Friday, 14:15 - 15:45, online via Zoom
- Livestream: Zoom meeting, Passcode: rPZCumB7H, used for lectures and tutorials
Lectures & Tutorials
Date | Type | Topic | Material | Recordings |
---|---|---|---|---|
Tu 2024-10-15 | Lecture | Introduction | 00-intro.pdf, 01-starting-haskell.pdf | |
Fr 2024-10-18 | Lecture | Introduction | Slides | Video |
Tu 2024-10-22 | Lecture | Functions, Lists, Algebraic Datatypes | Video (part 1), Video (part 2) | |
Tu 2024-10-29 | Lecture | Algebraic Datatypes, Higher-Order Functions | Slides, Programs | Video |
We 2024-10-30 | Tutorial | Discussion of Exercise 1 | Video | |
Tu 2024-11-05 | Lecture | Higher-Order Functions, Laziness | Slides, Programs | Video |
Fr 2024-11-08 | Tutorial | Discussion of Exercise 2 | Video | |
Tu 2024-11-12 | Lecture | Type classes and IO | Slides, Slides, Programs | Video |
Fr 2024-11-15 | Tutorial | Discussion of Exercise 3 | Video | |
Tu 2024-11-19 | Lecture | Monads and the Gen Monad | Slides, Programs | Video |
Fr 2024-11-22 | Tutorial | Discussion of Exercise 4 | Video | |
Tu 2024-11-26 | Lecture | Monadic interpreters | Slides, Programs | Video |
Fr 2024-11-29 | Tutorial | Discussion of Exercise 5 | Video | |
Tu 2024-12-03 | Lecture | Functors, Applicatives | Slides, Programs | Video |
Fr 2024-12-06 | Tutorial | Discussion of Exercise 6 | Video | |
Tu 2024-12-10 | Lecture | Monad Transformers | Slides, Programs | Video |
Fr 2024-12-13 | Tutorial | Discussion of Exercise 7 | Video | |
Tu 2024-12-17 | Lecture | GADTs | Slides, Programs | Video |
Fr 2024-12-20 | Tutorial | Discussion of Exercise 8 | Video |
Exercises
# | Topic | Material |
---|---|---|
0 | Installation & Basic Usage of the Haskell Toolchain | |
1 | Functions, Lists, Recursion | PDF, Solution |
2 | Higher-Order Functions | PDF, Code, Solution |
3 | Lazy Evaluation | PDF, Solution |
4 | Type Classes & IO | PDF, Solution |
5 | QuickCheck’s Arbitrary & AVL Trees | PDF, Solution |
6 | Functors & Monads | PDF, Code, Solution |
7 | Applicatives & Parsers | PDF, Code, Solution |
8 | Monad Transformers | PDF, Code, Solution Part 1, Solution Part 2 |
9 | GADTs | PDF, Code |
Content
This course conveys fundamental concepts of functional programming using the programming language Haskell.
Goal
Learning objectives from the module compendium: “Development of a non-procedural view on algorithms and data structures, confident handling of higher-order functions and data, knowledge and ability to apply fundamental functional programming techniques, knowledge of advanced programming concepts, ability to develop medium-size functional programs independently.”
Topic List
- Definition of functions, pattern matching, higher-order functions
- Types and type classes
- Algebraic data types
- Functional data structures
- Applicative parsers
- Monads and monad transformers
- Arrows
- Verification of functional programs
- Monadic I/O and stream I/O
Preliminaries
Interest in learning and applying new programming concepts and languages.
Literature
The book Programming in Haskell by Graham Hutton covers about 30% of the lecture. This book is available in the TF-library.
Stephen Diehl’s WHAT I WISH I KNEW WHEN LEARNING HASKELL
Exam
The exam will be on 2025-03-06 and will take place in the computer pools. Further information will be announced in time.
Communication
We provide a discord-like chat to allow for asynchronous questions about the lecture, exercises, and functional programming in general. You can log in there with your Ilias credentials.
Announcements will be sent via email through HisInOne. If you do not want to miss these announcements, you should register for the course in HisInOne!