In this lecture we do a quick recap of Haskell and talk about things like referential transparency, laziness, type classes, and a first simple example of a domain specific embedded language: Signal.)
In this lecture we develop domain specific embedded languages for describing signals and shapes. We talk about the distinction between a deep and a shallow embedding, about compositionality and abstraction.
This lecture introduces monads by looking at how to design a simple library for input/output.
In this lecture we look at another application of monads, namely parsing. We also see how to refine the implementation of a library. Starting from a naive translation from syntax to semantics, we derive intermediate representations for an efficient implementation. The focus here is on learning outcome "Spec: use specifictaion based development techniques".
We learn how to build complicated monads from simple building blocks.
We look at program verification: proving, specifying and testing correctness of programs.
We look at two recent extensions to Haskell: GADTs and Type families.
In this lecture / excerices session we will work through old AFP exam questions in groups to identify important topics and practice collaborative problem solving and discussion. This is in response to student comments from last year wanting more practice of the kind of problems typically included in the written exams.
Feldspar is an embedded language for high-performance numeric processing. Its development is motivated by the need to raise the abstraction level of signal processing code in Ericsson's radio base station. In this lecture I will present Feldspar with a special focus on its implementation in Haskell.
In this lecture we continue the work on QuickCheck, mainly looking at how to generate and shrink test data. We may also look at the different stackings of the monad transformers in the Interpreter4 example (from the MonadTransformes lecture). We also check out how the program coverage tool hpc can be used to see what parts of a program has been tested.
In dependently typed languages such as Agda one can both write programs and proofs about the programs. Agda can be seen as a "next generation Haskell".
In dependently typed languages such as Agda one can both write programs and prove propositions which refer to the programs. Building on Patrik's introduction to Agda I will implement a very simple theorem prover, and formally prove that it is sound.
Lazy SmallCheck is a testing tool for Haskell which is based on exhaustive enumeration of test cases (instead of random test case generation). It uses lazy narrowing, a search mechanism suitable for functional programming languages which exploits non-strictness. In the lecture I will present lazy narrowing, how the tool is implemented as a library using type reflection and exception trapping, and how to use the tool for testing (contrasting it to QuickCheck).
In this lecture we look back at the learning outcomes and how they relate to the different parts of the course and what parts of the RWH book are covered. Some other relevant topics did not fit but I include references and code below.