Uni-Logo

Functional Programming

Personal

Lecture Prof. Dr. Peter Thiemann thiemann@info...
ExerciseDr. Weili Fuweilifu@info...
Time and place: Lecture: Wednesdays, 12 - 14, Online
Tutorials: by appointment, Online

News

2021-04-01Github page
2021-04-17Homepage online
2021-04-21Introductory lecture live at 12:00 on YouTube (link forthcoming)
2021-07-XXProject available

Lecture Materials

DateContentCodeRecording
2021042100-intro.pdfYouTube
2021042101-starting-haskell.pdfExamples (after lecture)FPLecture01.mov 720p
20210426 02-haskell-functions.pdf
20210426 03-haskell-types.pdf Examples (after lecture) FPLecture02.mov 720p
20210503 04-define-types.pdf Examples (after lecture) (720p480p) (720p480p) (720p480p)
20210503 05-more-about-lists.pdf Examples (after lecture) (720p480p), (720p480p)
20210510 06-higher-order.pdf Examples (after lecture) FPLecture06.mov 720p
20210519 07-laziness.pdf Examples (after lecture) FPLecture07.mov 720p
20210519 08-type-classes.pdf Examples (after lecture) 720p480p
20210527 Functional-data-structures.pdf Examples (after lecture) FPLecture10.mov 720p
20210527 10-io.pdf Examples (after lecture) part 1(720p) (480p) part 2(720p)
20210531Functors and Applicatives 11-functors-applicatives.pdf Examples (after lecture) FPLecture12.mov 720p
20210531Functors, Applicatives 11-functors-applicatives.pdf Examples (after lecture) FPLecture13.mov 720p
20210609Parsing with Combinators 11-functors-applicatives.pdf part1 (720p480p) part 2 (720p480p) part 3 (720p480p) part 4 (720p480p)
20210609Interpretation and monads 12-monadic-interpreter.pdf Examples (after lecture) FPLecture14.mov 720p
20210615Interpretation and monads (cont'd) 12-monadic-interpreter.pdf Examples (after lecture) Examples (after lecture) FPLecture15.mov 720p
20210615Composition and monad transformers 13-monad-transformers.pdf Examples FPLecture16.mov 720p
20210622Modular monadic interpreters 13-monad-transformers.pdf Lecture Material FPLecture17.mov 720p
20210622Generalized algebraic datatypes (GADTs) 14-gadt.pdf Lecture Material FPLecture18.mov 720p
20210628GADTs (cont'd), Lambda Calculus 15-lambda-calculus.pdf Material GADTs, examples lambda calculus FPLecture19.mov gadt 720p, FPLecture20.mov lambda 720p
20210628Lambda Calculus (cont'd) 15-lambda-calculus.pdf examples lambda calculus FPLecture21.mov lambda 720p
20210705Lambda Calculus (cont'd) 15-lambda-calculus.pdf examples lambda calculus FPLecture22.mov lambda 720p
20210705Applied Lambda Calculus and Typing 16-evaluation-strategies.pdf examples lambda calculus FPLecture23.mov lambda 720p
20210712Mini-ML and Polymorphic Typing 17-polymorphic-types.pdf soundness of type inference FPLecture24.mov 720p

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

Exercises

Date of issueExercise SessionSolutions
2021-04-282021-04-29 Exercise 0 (Installation)
2021-04-282021-04-29 Exercise 1 (First steps) ex1.hs
2021-04-302021-05-06 Exercise 2 (Recursion, Datatypes) Tracks.hs Exercise2.hs ex2.hs
2021-05-072021-05-20 Exercise 3 (Datatypes, Typeclasses) ex3.hs Pics.hs
2021-05-192021-05-27 Exercise 4 (High order functions, Functional data structures) Exercise4.hs Trie.hs TrieMap.hs
2021-06-032021-06-17 Exercise 5 (IO, Parser Combinators) ParserCon.hs MiniWhile.hs Numbers.hs StackCalc.hs MiniWhileA.hs ex5.hs ParserConAn.hs
2021-06-222021-07-01 Exercise 6 (State Monad) Exercise6.hs ex6.hs
2021-07-052021-07-14 Exercise 7 (Monad Transformers) ex7.hs Logging.hs Protected.hs
2021-07-212021-07-21 Exercise 8 (GADTs) ex8.hs StackGadt.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 is the basis for the first 30% of the lecture. This book is available in the TF-library.

Stephen Diehl's WHAT I WISH I KNEW WHEN LEARNING HASKELL

Organization

Schedule

LectureMi 12-15 ctonline
ExerciseThursday 10AM to 12AM, Zoom room (Meeting ID : 669 8403 5031, passcode : Haskell21)online

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

All Bachelor students must do an oral exam, which will take place on September 6. Particularly, if you inscribe "PO 2012" you must take the oral exam. All other students will have a take-home exam consisting of a programming task and a few questions, which will be published on September 6. The participants have at least 24 hours to work on it, and the answers must be turned in on September 7. This date will be scheduled in the exams system as well.

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!