Type-level programming with match types
Olivier Blanvillain, Jonathan Immanuel Brachthäuser, Maxime Kjaer, Martin Odersky
Abstract
Type-level programming is becoming more and more popular in the realm of functional programming. However, the combination of type-level programming and subtyping remains largely unexplored in practical programming languages. This paper presents match types , a type-level equivalent of pattern matching. Match types integrate seamlessly into programming languages with subtyping and, despite their simplicity, offer significant additional expressiveness. We formalize the feature of match types in a calculus based on System F sub and prove its soundness. We practically evaluate our system by implementing match types in the Scala 3 reference compiler, thus making type-level programming readily available to a broad audience of programmers.
Ask Lune
Know where this paper stands in minutes, not an afternoon.
Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
its abstract · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers4
- Orthologic with AxiomsSimon Guilloud, Viktor KuncakPOPL 2024 · 4 citations
- P4R-Type: A Verified API for P4 Control Plane ProgramsJens Kanstrup Larsen, Roberto Guanciale, Philipp Haller, Alceste ScalasOOPSLA 2023 · 1 citation
- Interactive Data Analysis with Lively Typed TablesAlexander Bandukwala, Cyrus OmarOOPSLA 2026
- Typestate via Revocable CapabilitiesSonglin Jia, Craig Liu, Siyuan He, Haotian Deng et al.PLDI 2026
Related papers
- Modular Type Safety for Traits with Extensible Variants and Deep Pattern MatchingAndong Fan, Lionel Parreaux, Ningning XieOOPSLA 2026
- Intensional datatype refinement: with application to scalable verification of pattern-match safetyEddie Jones, Steven J. RamsayPOPL 2021 · 3 citations
- First-Class Refinement Types for ScalaMatt Bovel, Viktor Kunčak, Martin OderskyOOPSLA 2026
- Undecidability of d<: and its decidable fragmentsJason Z. S. Hu, Ondrej LhotákPOPL 2020 · 9 citations
- MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 citations
