Overview
- Advanced functional programming techniques
- Presented in the Haskell programming language
- Topics:
- using types to enforce properties of programs
- structuring programs using monads, functors and applicatives
- using and designing embedded domain-specific languages (EDSLs)
- property-based testing (e.g. QuickCheck)
Pre-requisites
- Introductory functional programming (CC1005)
- Discrete maths and logic (CC1001, CC2003)
- Compilers course (CC3001)
Not essential but desirable
- Some programming experience (e.g. in at least two different languages)
- Curiosity to learn how FP applies to larger problems
- Desire to learn how abstractions can help us develop better programs
Outline
- Review of Haskell: types, values, functional decomposition, higher-order functions, lazy evaluation
- Parametric polymorphism and ad-hoc polymorphism
- Monads: I/O, partiality, exceptions, lists, state, parsing; monad transformers
- Functors and applicatives
- Property-based testing using the QuickCheck library
- Designing embeded domain-specific languages
Classes
- 2 × 1.5h lecture/demonstration classes
- By video-conferencing (Teams)
You can also reach me out of class:
- Pedro Vasconcelos
pbv@dcc.fc.up.pt
Assessment
- Two programming assignment (8/20 pts)
- done individually
- proposals will be made available after the first classes
- Written final exam (12/20 pts)
- Minimum 50% mark on final exam
References
For catching up on basic Haskell:
References (cont.)
About FP in general:
- “Why functional programming matters”, J. Hughes, 1989 PDF
- “A History of Haskell: being lazy with class”, P. Hudak, J. Hughes. S. Peyton Jones, P. Wadler, 2007 PDF
More study material (papers, lecture notes, code samples, etc.) will be provided alongside the lectures.