Uni-Logo

Functional Programming

Personal

Lecture Prof. Dr. Peter Thiemann thiemann@info...
ExerciseGabriel Radanneradanne@info...
AssistantFelix Kargkargf@info...

News

2017-10-16Github page
2017-10-04Homepage online

Lecture Materials

DateContentCodeRecording
2017101600-intro.pdfnone
2017101601-starting-haskell.pdfExamples (after lecture)720p480p
2017101803-haskell-types.pdfExamples (before lecture)720p480p
2017102304-define-types.pdfExamples (after lecture), M04TypeAliases.hs, M04Cards.hs (incomplete), 03 continued (720p480p), 04 first part (720p480p)
2017102504 continued M04Cards.hs (incomplete), 04 next part (720p480p)
2017103004 continued, 05-more-about-lists.pdf M05Lists.hs, 04 last part (720p480p), 05 (720p480p)
2017110606, 06-higher-order.pdf M06HO.hs, 06 part 1 (720p480p), 06 part 2 (720p480p)
2017110807, 07-io.pdf 06 part 3 (720p480p), 07 part 1 (720p480p)
2017111308, 08-type-classes.pdf 07 part 2 (720p480p), 08 (720p480p)
2017111509, 09-test-data-generators.pdf 09 (720p480p)
2017112010, 10-monadic-interpreter.pdf 10 (720p480p)
2017112211, 11-parsing.pdf M11-parser-20171122.lhs 11 (720p480p)
2017112711, 11-parsing.pdf M11-parser-20171128.lhs 11 part 2 (720p480p)
2017112911, 11-parsing.pdf M11-parser-20171129.lhs 11 part 3 (720p480p)
2017120411-parsing.pdf, 12-lambda-calculus.pdf M11-parser.lhs 11 part 4 (720p480p), 12 part 1 (720p480p),
20171206 12-lambda-calculus.pdf cont'd 12 part 2 (720p480p),
20171211 13-evaluation-strategies.pdf and simple types no recording (QuickTime failed)
20171213 13 continued/finished no recording (audio input failed)
20171218 14-polymorphic-types.pdf M14inference.hs 14 part 2 (720p480p), discussion of the code (720p480p)
20171220 M14inference.hs discussion of the code part 2 (720p480p)
20170108 15-monad-transformers.pdf M15monadtransformers.hs
20170110 16-gadt.pdf M16GADT.hs
20180117 Data types a la carte (no slides) M17alacarte.lhs screen recording (720p480p)
20180122 Data types a la carte (cont) M17alacarte.lhs screen recording (720p480p)
20180124 Generic programming Generics for the Masses M18generic.lhs screen recording (720p480p)
20180129 Generic programming (cont'd), Purely functional data structures M19functionaldata.lhs screen recording (part 1: generics 720p480p), (part 2: purely functional data structures 720p480p)
20180131 Purely functional data structures (cont'd) screen recording (720p480p)
20180205 Purely functional data structures (cont'd), A taste of Agda (not relevant for exam) Agda Tutorial screen recording (data structures 720p480p) (Agda 720p480p)
20180207 A taste of Agda (not relevant for exam) screen recording (Agda 720p480p)

Note: "Recordings" are unedited screen recordings of the lecture. Only available inside Uni Freiburg network.

Exercises

Date of issueExercise SessionSolutions
2017-10-18n/a Exercise 0 (Installation)
2017-10-182017-10-25 Exercise Sheet 1 - First steps
2017-10-252017-11-08 Exercise Sheet 2 - Recursion, Datatypes Tracks.hs
2017-11-202017-11-22 Exercise Sheet 3 - Datatypes, Typeclasses Logs.hs Pics.hs
2017-11-272017-11-29 Exercise Sheet 4 - High order functions, IO StackCacl.hs
2017-12-112017-12-13 Exercise Sheet 5 - Parsing ParserCon.hs MiniWhile.hs
2017-12-182017-12-20 Exercise Sheet 6 - State monad SolutionEx6.hs SolutionMiniWhile.hs
2017-01-082017-01-10 Exercise Sheet 7 - Monads, Monad transformers
2017-01-222017-01-24 Exercise Sheet 8 - GADTs
2017-01-292017-01-31 Exercise Sheet 9 - Data Types à la carte

Project

The description of the project is available here. The regex test library is RegexTestLib.hs.

07/02/2018: Fix in Figure 4, The definition of derive(r*) was erronous.

14/02/2018: Add the testsuite, along with some documentation.

Content

This course conveys fundamental concepts of functional programming using the programming language Haskell.

Goal

Learning objectives from the module compendium: “Development of an alternative 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 programming and in learning and applying new programming concepts and languages. No previous knowledge of Haskell is required.

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

LectureMo 14-16 ctGeb. 101 - SR 01-016
We 14-15 ctGeb. 101 - SR 01-016
ExerciseWe 15-16 ctGeb. 101 - SR 01-016

Modality of exercise

Exercise sheets are added to the website one week in advance. Exercises are not graded and solutions do not have to be sent for evaluation. If you want to check your work, you are of course welcome to ask during the exercise sessions or by email. It is expected that each student work on each exercise sheet. You thus have to demonstrate that you are following the exercises, either physically by comming to the exercises sessions or digitally by sending an email showing your progress. Solutions will be provided "on demand" for specific exercises.

Preliminaries

To be admitted to the exam, each participant has to process every exercise sheet. If participants cannot come up with a useful answer to the exercise, they should submit a rationale instead.

Exam

If there are less than 20 registrations for the exam, there will be an oral exam during the examination period. Otherwise, there will be a written exam (closed book). We offer a graded programming project at the end of the teaching period. Students who pass the final exam can improve their grade with a passed programming project.

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!