Understanding Haskell-style Overloading via Open Data and Open Functions
Andrew Marmaduke, Apoorv Ingle, and J. Garrett Morris

TL;DR
This paper introduces System F_D, a new core language with open data types and functions, providing a uniform semantics for Haskell-style overloading and encoding advanced type class features more expressively.
Contribution
It presents a novel semantics for overloading using open data and functions, mechanized in Lean4, surpassing existing semantics in expressiveness without extra axioms.
Findings
System F_D can encode advanced Haskell type class features.
The semantics is mechanized in Lean4, ensuring formal correctness.
It offers a more expressive framework than current semantics.
Abstract
We present a new, uniform semantics for Haskell-style overloading. We realize our approach in a new core language, System F, whose metatheory we mechanize in the Lean4 interactive theorem prover. System F 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 F 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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Semantic Web and Ontologies · Security and Verification in Computing
