Lune

POPL2024Top-tier venue

The Essence of Generalized Algebraic Data Types

Filip Sieczkowski, Sergei Stepanenko, Jonathan Sterling, Lars Birkedal

Abstract

This paper considers direct encodings of generalized algebraic data types (GADTs) in a minimal suitable lambda-calculus. To this end, we develop an extension of System F ω with recursive types and internalized type equalities with injective constant type constructors. We show how GADTs and associated pattern-matching constructs can be directly expressed in the calculus, thus showing that it may be treated as a highly idealized modern functional programming language. We prove that the internalized type equalities in conjunction with injectivity rules increase the expressive power of the calculus by establishing a non-macro-expressibility result in F ω , and prove the system type-sound via a syntactic argument. Finally, we build two relational models of our calculus: a simple, unary model that illustrates a novel, two-stage interpretation technique, necessary to account for the equational constraints; and a more sophisticated, binary model that relaxes the construction to allow, for the first time, formal reasoning about data-abstraction in a calculus equipped with GADTs.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Logical Relations for Formally Verified Authenticated Data StructuresSimon Oddershede Gregersen, Chaitanya Agarwal, Joseph TassarottiCCS 2025
  2. Backwards-Compatible Row-Based Exceptions in MLSimcha van Collem, Paulo Emílio de Vilhena, Robbert KrebbersPLDI 2026

Related papers

  1. Full Iso-Recursive TypesLitao Zhou, Qianyong Wan, Bruno C. d. S. OliveiraOOPSLA 2024 · 4 citations
  2. A case for DOT: theoretical foundations for objects with pattern matching and GADT-style reasoningAleksander Boruch-Gruszecki, Radoslaw Wasko, Yichen Xu, Lionel ParreauxOOPSLA 2022 · 4 citations
  3. Recursive Subtyping for AllLitao Zhou, Yaoda Zhou, Bruno C. d. S. OliveiraPOPL 2023 · 8 citations
  4. On the semantic expressiveness of recursive typesMarco Patrignani, Eric Mark Martin, Dominique DevriesePOPL 2021 · 16 citations
  5. Type-level programming with match typesOlivier Blanvillain, Jonathan Immanuel Brachthäuser, Maxime Kjaer, Martin OderskyPOPL 2022 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines