Extensible Data Types with Ad-Hoc Polymorphism
This paper proposes a novel language design that combines extensible data types, implemented through row types and row polymorphism, with ad-hoc polymorphism, implemented through type classes. Our design introduces several new constructs and constraints useful for generic operations over rows. We formalize our design in a source calculus λ ρ ⇒ , which elaborates into a target calculus F ω ⊗⊕ . We prove that the target calculus is type-safe and that the elaboration is sound, thus establishing the soundness of λ ρ ⇒ . All proofs are mechanized in the Lean 4 proof assistant. Furthermore, we evaluate our type system using the Brown Benchmark for Table Types, demonstrating the utility of extensible rows with type classes for table types.
Authors
- Ningning Xie (ORCID: https://orcid.org/0000-0002-5961-1493)
- Yanning Chen
- Matthew Toohey (ORCID: https://orcid.org/0000-0002-7070-405X)
- Ara Jamalzadeh
Institutions
- University of Toronto (CA)
Publication Details
- Journal
- Proceedings of the ACM on Programming Languages
- Published
- 2026-01-08
- DOI
- https://doi.org/10.1145/3776662
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00