Functional Programming

Lecture
Readers
Torsten GrustDenis Hirn
Lecture
Do, 10:15–11:45, Sand 14, Raum C215
Tutorial
Di, 12:15–13:45, Sand 14, Raum C215
Exam
Do, 27. Juli 2023, 12:15–13:45, Sand 6/7, Raum F119

Numbers are values. Strings are values. Booleans are values. In Functional Programming, functions are values as well. This view of programming leads to an elegant and expressive programming paradigm which we will investigate in this course. During the course, we will use the programming language Haskell. The majority of the concepts we will consider applies in other (functional) languages as well.

Participants are not expected to be fluent in Haskell. We will spend the first weeks of the semester on a Haskell Ramp-Up. Things will progress rather fast, though. The majority of the semester will be used for the good stuff: intermediate and advanced topics, of which there are plenty.

❓ If you have questions regarding this course, please take a look at the General Infos about our courses (German) or contact us via db-lehre@cs.uni-tuebingen.de.

Syllabus

This course will provide an introduction to Haskell (first half) and then touch on intermediate-level topics. We will discuss (topics in parentheses will be addressed if we’ll find the time):

  • Values and types
  • Function definitions (guards, pattern matching)
  • List processing
  • Algebraic data types
  • Type classes
  • Domain-specific languages (DSLs; shallow and deep embedding)
  • Laziness
  • Functors. Applicative Functors, Monads
  • (Monadic parsing)
  • (Applications: breadth-first search, path finding)

Tutorial and Exercises

  • We will provide weekly exercise sheets (hand-out: TBD, hand-in by TBD).
  • For details on the weekly exercises, check out our discord server which we use as a forum.

Haskell (GHC, Haskell Platform)

The course will use the de-facto standard Haskell compiler GHC and its interactive variant (also known as read-eval-print loop or REPL) GHCi. We strongly suggest you download and install ghcup which can be used to install both GHC and GHCi (and more). Available for virtually all operating systems, including Windows (WSL2), Linux, macOS. Make sure to install the recent version.

Literature

The following introductory books and courses on Haskell are recommend reading — some of these are available online:

We will refer to additional material for the individual topics during the semester.

Material