The Calculated Typer (Functional Pearl)

We present a calculational approach to the design of type checkers, showing how they can be derived from behavioural specifications using equational reasoning. We focus on languages whose semantics can be expressed as a fold, and show how the calculations can be simplified using fold fusion. This approach enables the compositional derivation of correct-by-construction type checkers based on solving and composing fusion preconditions. We introduce our approach using a simple expression language, to which we then add support for exception handling and checked exceptions.

Authors

Institutions

Publication Details

Published
2025-10-09
DOI
https://doi.org/10.1145/3759164.3759346
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The Calculated Typer (Functional Pearl)

Patrick Bahr, Graham Hutton, Zac Garby
Logic, programming, and type systems
article

The Calculated Typer (Functional Pearl)

Patrick Bahr, Graham Hutton, Zac Garby
article en

Abstract

We present a calculational approach to the design of type checkers, showing how they can be derived from behavioural specifications using equational reasoning. We focus on languages whose semantics can be expressed as a fold, and show how the calculations can be simplified using fold fusion. This approach enables the compositional derivation of correct-by-construction type checkers based on solving and composing fusion preconditions. We introduce our approach using a simple expression language, to which we then add support for exception handling and checked exceptions.

University of Nottingham (GB), IT University of Copenhagen (DK)
Engineering and Physical Sciences Research Council
Openalex Percentile: Top 85%
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

The Calculated Typer (Functional Pearl) — Patrick Bahr, Graham Hutton, et al. · (2025) | TGRS Research Map | TGRS