English

Understanding Haskell-style Overloading via Open Data and Open Functions

Programming Languages 2025-07-23 v1

Abstract

We present a new, uniform semantics for Haskell-style overloading. We realize our approach in a new core language, System FD_\mathrm{D}, whose metatheory we mechanize in the Lean4 interactive theorem prover. System FD_\mathrm{D} is distinguished by its open data types and open functions, each given by a collection of instances rather than by a single definition. We show that System FD_\mathrm{D} can encode advanced features of Haskell's of type class systems, more expressively than current semantics of these features, and without assuming additional type equality axioms.

Keywords

Cite

@article{arxiv.2507.16086,
  title  = {Understanding Haskell-style Overloading via Open Data and Open Functions},
  author = {Andrew Marmaduke and Apoorv Ingle and J. Garrett Morris},
  journal= {arXiv preprint arXiv:2507.16086},
  year   = {2025}
}
R2 v1 2026-07-01T04:12:25.504Z