Uni-Logo

Functional Programming

Personal

Lecture Prof. Dr. Peter Thiemann thiemann@info...
ExerciseJanek Spadernaspadernj@info...
Time and place Lecture: Wednesdays, 14-16, SR 051-00-031 Zoom meeting (lectures)
Tutorials: Fridays, 14-16, online BBB meeting (exercises)

News

2023-02-05Exam information
2023-01-18ONLY RECORDING THIS WEEK
2022-12-07NO LECTURE THIS WEEK
2022-10-21BBB meeting for the exercises
2022-10-19Zoom meeting for the lectures
2022-10-01GitHub page
2022-10-01Homepage online

Lecture Materials

DateContentCodeRecording
2022101900-intro.pdf
2022101901-starting-haskell.pdfExamples (after lecture)Recording
20221021 02-haskell-functions.pdf Examples (after lecture) Recording
03-haskell-types.pdf
20221026 04-define-types.pdf Examples (after lecture) Recording
05-more-about-lists.pdf Examples (after lecture)
20221102 06-higher-order.pdf Examples (after lecture) Recording
slides-20221102-terms.pdf
20221109 07-laziness.pdf Examples (after lecture) Recording
08-type-classes.pdf
20221116 Functional-data-structures.pdf Examples Recording
20221123 09-io.pdf, 10-test-data-generators.pdf Examples (after lecture) Recording
20221130 11-monadic-interpreter.pdf Recording
20221207NO LECTURE THIS WEEK
20221214ONLINE ONLY (due to weather) 12-functors-applicatives.pdf Examples Examples Recording
20221221 (continued) 12-functors-applicatives.pdf Examples Examples Recording
20230111Composition and monad transformers 13-monad-transformers.pdf Examples Recording
20230118Generalized algebraic datatypes (GADTs) 14-gadt.pdf Lecture Material FPLecture18.mov 720p
20230125Datatypes a la carte (paper) Example code (after lecture) Recording
20230201Datatypes a la carte (Free Monads) Example code (after lecture) Recording
20230208Lambda Calculus 15-lambda-calculus.pdf Examples from lecture, examples lambda calculus (2019) Recording

Note: "Recordings" are unedited screen recordings of the lecture.

Exercises

Date of issueExercise SessionSolutions
2022-10-192022-10-21Installation and Setup
2022-10-212022-10-28Exercise 1 (First steps)Ex01.hs
2022-10-282022-11-04 Exercise 2 (Second steps, Datatypes) Tracks.hs Ex02.hs
2022-11-042022-11-11 Exercise 3 (Folding, Terms, Substitution) BoolTerm.hs Ex03.hs Solutions
2022-11-112022-11-18Exercise 4 (Laziness, Typeclasses)Ex04.hs
2022-11-182022-11-25 Exercise 5 (Functional data structures) Trie.hs Ex05.hs Trie.hs TrieMap.hs
2022-11-252022-12-02Exercise 6 (IO) Numbers.hs StackCalc.hs Grep.hs
2022-12-042022-12-09 Exercise 7 (Monads I) SimplePrelude.hs NQueens.hs MiniLang.hs NQueens.hs These.hs MiniLang.hs
2022-12-122022-12-16 Exercise 8 (Monads II) Templates.hs Ex08.hs
2022-12-192023-01-13Exercise 9 (Functors, Applicatives, Monads)Ex09.hs
2023-01-152023-01-20 Exercise 10 (Parsing) Parser.hs MiniLang.hs MiniLangParser.hs MiniLangParser.hs Main.hs
2023-01-232023-01-27Exercise 11 (Monad transformers I, GADTs I)Ex11.hs
2023-01-302023-02-03Exercise 12 (Monad transformers II, GADTs II)Ex12.hs
2023-02-052023-02-10 Exercise 13 (Datatypes à la carte) ALaCarte.hs Ex13.hs

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

Organization

Modality of exercise

Exercise sheets are added to the website one week in advance. Exercises are not graded, but solutions may be submitted. If you want to check your work, you are of course welcome to ask during the exercise sessions or by email. Solutions will be discussed during the exercise session.

Exam

The exam will be a Take-Home Exam. It will be available by 2023-03-13 23:59. You have 48 hours to work on the exercises. Submission deadline: 2023-03-15 23:59.

The exam will be made available through the Ilias course Functional Programming - Take Home Exam - WS22/23. Exam submission will be handled through that same course. If you registered for the exam you should have received an e-mail containing an invitation link. Please contact us if you need access to the Ilias course.

Communication

Announcement will be posted on this page under the rubric News. Urgent announcements will also be sent via email through HisInOne. If you do not want to miss these announcements, you should register for the course in HisInOne!