This is the main home page of the course Functional programming and type systems, also known under the code names 2.4 and FUN. The course also has a shorter official page on MPRI's site.
Optional: please take a few minutes to fill our unofficial registration form. This helps us know you better and faster.
This course presents the principles, formalisms, and mathematical techniques that underlie many of today's typed programming languages, including OCaml, Haskell, and Rust. Here are some introductory slides.
The course is taught by Jacques-Henri Jourdan (JHJ), François Pottier (FP) (head), Gabriel Scherer (GS), and Yannick Zakowski (YZ). This year, one lecture will be given by Didier Rémy (DR).
The content of the course is partly renewed in 2025-2026. In particular, we will go deeper into monads, with two new lectures on interaction trees and modular monadic semantics for programming languages. Also, the last part of the course includes a new lecture on translating Rust to purely functional code.
Didier Rémy's slides and lecture notes, from an earlier version of the course, are still available and can serve as a useful reference.
The lectures take place at University of Paris, Bâtiment Sophie Germain, in room 1004.
They are scheduled on Wednesdays from 12:45 to 15:30. There is a 15-minute break in the middle of each lecture, so each lecture lasts 2h30.
The syllabus is organized in four main segments of roughly comparable sizes. The title of each segment (below) is a hyperlink; click it to obtain a more detailed description of each segment.
-
(17/09/2025) From operational semantics to interpreters (FP).
- Introduction to this course (slides)
- Slides (with animations; without animations)
- Optional extra material: Rocq in a nutshell; representing abstract syntax with binders (with animations, without animations)
-
(24/09/2025) Syntactic proofs of type soundness for simply-typed lambda-calculus and for System F (FP).
- Slides (with animations; without animations)
- definition of simply-typed λ-calculus in Rocq
- auxiliary lemmas and judgements in Rocq
- subject reduction and progress in Rocq: template, solution
-
(01/10/2025) Algebraic data types and existential types (FP).
-
(08/10/2025) GADTs (FP).
-
(15/10/2025) Closure conversion and defunctionalization (FP).
- (slides 05, slides without animations 05).
- Optional extra material: the CPS transformation (slides 06; slides without animations 06)
-
(22/10/2025) Hindley-Milner type inference; bidirectional type inference (GS).
- (slides)
-
(29/10/2025) Break
-
(05/11/2025) System F with mutable state; the value restriction; type soundness (GS).
- (slides)
-
(12/11/2025) Unary logical relations for simple types; (weak) normalisation of simply-typed λ-calculus; unary logical relations for polymorphic types; (weak) normalisation of System F (GS).
-
(19/11/2025) Binary logical relations and parametricity; logical relations for mutable state, with step-indexing (GS).
-
(26/11/2025) mid-term exam, in rooms 1002 and 1004 and at the usual time, from 12:45 to 15:30, without a break. The duration of the exam is 2h45.
-
(03/12/2025) Break
-
(10/12/2025) System Fω; modules (GS).
-
(17/12/2025) Ad hoc polymorphism and overloading (DR).
-
(07/01/2026) Applicative functors and monads (YZ).
-
(14/01/2026) The free monad, the delay monad, and interaction trees (YZ).
-
(21/01/2026) Modular monadic semantics via layers of effect interpretations (YZ).
-
(28/01/2026) Introduction to programming in Rust (JHJ).
-
(04/02/2026) Rust generics and traits (JHJ).
-
(11/02/2026) Practicing Rust; concurrency (JHJ).
-
(18/02/2026) Metatheory of Rust's type system; a semantic interpretation of types (JHJ).
-
(25/02/2026) Translating Rust to purely functional code (JHJ).
-
(04/03/2026) break
-
(11/03/2026) final exam, in the usual room and at the usual time, from 12:45 to 15:30, without a break. The duration of the exam is 2h45.
Two written exams and one programming project are used to evaluate the students.
The mid-term exam will take place on 26/11/2025.
The deadline for the programming project is 27/02/2026.
The final exam will take place on 11/03/2026.
The coefficients are:
- either mid-term exam: 3 and final exam: 4 or mid-term exam: 4 and final exam: 3 (whichever is more advantageous for each student);
- programming project: 3.
Thus, the sum of the coefficients is 10.
The exams take place in the usual room and at the usual time, from 12:45 to 15:30, without a break. The duration of the exam is 2h45.
Only printed course notes and hand-written notes are allowed during the mid-term and final exams. Electronic devices are not allowed.
Although the course evolves over time, you are encouraged to have a look at the previous exams and their solutions:
- final exam 2024-2025: structural ML type inference.
- mid-term exam 2024-2025: a simple proof technique for certain parametricity results.
- final exam 2023-2024: circuits and functors.
- mid-term exam 2023-2024: fixed point combinators and recursive types.
- final exam 2022-2023: safe unchecked arrays; branded types in Rust.
- mid-term exam 2022-2023: extensible records.
- final exam 2021-2022: type class elaboration.
- mid-term exam 2021-2022: gradual typing.
- intermediate exam 2020-2021: calcul d'objets.
- mid-term exam 2020-2021: delimited control in System F.
- final exam 2019-2020: gradually-typed functional languages.
- mid-term exam 2019-2020: a type system for information flow control.
- final exam 2018-2019: (not available)
- mid-term exam 2018-2019: a simple object encoding.
- final exam 2017-2018: static differentiation.
- mid-term exam 2017-2018: encoding call-by-name into call-by-value; extensible records (Coq solution of part 1).
Programming is an important part of the course. We give a mandatory programming project, which counts for about a third of the final grade.
The project for the year 2025-2026 should be made available in late November 2025.
The deadline is: Friday, February 27, 2026, at 23:59.
We, the teachers of this course, usually post a few internship offers at some point during the fall.
Please do not hesitate to talk to us (during the break or at the end of each lecture), to contact us by email, or to visit us at our offices.
- Xavier Leroy and François Pottier have posted an offer on relational separation logic for compiler verification. This offer has been taken up and is no longer available.
- Didier Rémy has posted an offer on the revival of semi-unification.
- Gabriel Scherer has a topic on Typst.
- Yannick Zakowski has posted several offers.
- Our colleague Yannick Forster has posted several offers.
To find internships related to the topics of this course, you may wish to also contact our colleagues:
- The Cambium team at Inria Paris. Keywords: program verification in separation logic (Iris; Osiris), programming language design and implementation (OCaml), proof assistants (Coq; MetaCoq), type systems, verified compilation, and more.
- The PPS lab at IRIF, which includes the Picube team. Keywords: programming language design and implementation (OCaml), proof assistants (Coq), semantics, type theory, and more.
- The Prosecco team at Inria Paris. Keywords: verification of security protocols (ProVerif; CryptoVerif; Squirrel), program verification, programming languages for the law (Catala), proof assistants (F*), software security, and more.
- The Antique team at ENS Paris. Keywords: abstract interpretation, program analysis, analysis of biological systems, and more.
- The Parkas team at ENS Paris. Keywords: synchronous programming languages, type systems, verified compilation, and more.
- The Partout team at Inria Saclay. Keywords: connections between computation and deduction, proof theory, type theory, and more.
- The Gallinette team at Inria Nantes. Keywords: formalized mathematics (Mathematical Components), proof assistants (Coq), type theory, and more.
- The Toccata team at Inria Saclay. Keywords: automated deduction, program verification, and more.
- The Epicure team at Inria Rennes. Keywords: automated deduction, program analysis, semantics, software security, verified compilation, and more.
- The Pesto team at Inria Nancy. Keywords: electronic voting, verification of security protocols, verified compilation, and more.
- The Stamp team at Inria Sophia. Keywords: formalized mathematics (Mathematical Components), proof assistants (Coq), verification of security protocols (EasyCrypt), and more.
- The Cash team at ENS Lyon. Keywords: compilation, formalized mathematics (Mathematical Components), program analysis, semantics, type systems, verified compilation, and more.
- The Camus team at Inria Strasbourg. Keywords: compilation, parallelism, program verification, semantics, and more.
We also have contacts abroad, mainly in Europe, North America, and Asia. If you would like to find an internship abroad, do not hesitate to talk to us.
See also the official list of internship offers at MPRI.
Please install opam first. A recent version is recommended. If you have installed it already, skip this step.
Then, install OCaml 4.12.0,
Coq 8.13.2,
and
AutoSubst by executing
this script.
This script does not destroy your existing installation of
OCaml and Coq. It creates a new "switch" named mpri24 and installs
appropriate versions of OCaml, Coq, and AutoSubst in it. You can activate
these versions with the following commands:
ORIGINAL=$(opam switch show)
opam switch mpri24
eval "$(opam config env)"and return to your original working environment with the following command:
opam switch "$ORIGINAL"
eval "$(opam config env)"In order to use Coq inside emacs,
ProofGeneral
is highly recommended.
Here is a suggested
installation script.
If desired, ProofGeneral can be further customized.
In order to participate to the hands-on exercises on Rust, please install the following tools:
- The Rust compiler (version 1.41 or newer)
- The Cargo package manager (any compatible version)
Installation should be easy on any recent Linux distribution using the system's package manager. An alternative is to follow these instructions.
In order to test the installation, the students are asked to use the Rust compiler on the following program:
fn main() {
let mut f = |x : i32| x;
let _r : &mut dyn Fn(i32) -> i32 = &mut f;
println!("{}", f(42))
}If the compiler is correctly installed, then the command rustc test.rs
should produce an executable.
Types and Programming Languages, Benjamin C. Pierce, MIT Press, 2002.
Advanced Topics in Types and Programming Languages, edited by Benjamin C. Pierce, MIT Press, 2005.
Practical Foundations for Programming Languages, Second Edition, Robert Harper, Cambridge University Press, 2016.