PREREQUISITES
This course starts from scratch and merely requires that students are already able to program. However, basic knowledge about higher order languages and first-class functions (such as Scheme, Lisp, Python, Ruby, Scala, Clojure, Erlang or Prolog) will be a big plus. On top of this, a basic knowledge of programming language theory (grammars, regular expressions, automata and lambda calculus) is assumed.
CONTENTS
Introduction to Haskell and Functional Programming, Higher-order Functions
Algebraic Data Types, Numbers, Strings, Tuples, Lists.
Type Classes: Definition and Instantiation.
Equational Reasoning and Structural Induction, Fusion Laws.
Type Classes: Implementation and Variations.
Input and Output using the IO-Monad, random numbers.
Functors and Applicative Functors, Monoids.
Monads and Monad Transformers: definition, monad laws, implementation, taxonomy of monads, the IO monad
Parsers and Parser combinators: definition and usage
Concurrent Programming: the par-function, threads in the IO monad, STM
Hindley-Milner Typing: definition and inference.
Algemene competenties
Knowledge and Understanding: This course is an advanced study of functional programming. Functional programming languages are programming languages that don't feature assignment statements (i.e. = or set!), nor sequencing (i.e. begin or {}) and standard I/O facilities since the latter are but assignments on global input and output state variables. Because of these constraints, functional programming languages have a number of scientific advantages w.r.t. imperative languages. On the one hand, these constraints engender a radically different way of programming. The goal of the course is to introduce students to programming techniques that are used by such pure languages in order to construct realistic software. On the other hand, it is our purpose to introduce students to the scientific advantages that are a consequence of the restrictions of such languages.
Application of Knowledge and Understanding: Students have to be able to apply the contents of the course in the conception of a software project in a functional programming language. This skill is tested by the fact that students have to implement a concrete project.
Making Judgements: Students have to be able to make a concrete judgement about the applicability of functional programming in a given situation. Once applicable, the role of (or the absence of) static typing in their choice of programming language has to be justified.
Learning Skills: We will acquaint the student with two functional programming languages that are sufficiently representative to provide the student with the necessary skills to classify other languages. This will also provide the student with enough programming experience in order to understand more advanced FP topics.