Generic Programming with Extensible Data Types; Or, Making Ad Hoc Extensible Data Types Less Ad Hoc
Alex Hubers, J. Garrett Morris

TL;DR
This paper introduces a new approach to generic programming with extensible data types using row types, formalized in System Rω, enabling flexible and modular data structure manipulation.
Contribution
It extends row typing to support generic programming over rows, capturing complex patterns like lifting and duality without field-specific constraints.
Findings
Formalization in System Rω with row types
Denotational semantics provided in Agda
Supports flexible, modular data type operations
Abstract
We present a novel approach to generic programming over extensible data types. Row types capture the structure of records and variants, and can be used to express record and variant subtyping, record extension, and modular composition of case branches. We extend row typing to capture generic programming over rows themselves, capturing patterns including lifting operations to records and variations from their component types, and the duality between cases blocks over variants and records of labeled functions, without placing specific requirements on the fields or constructors present in the records and variants. We formalize our approach in System R{\omega}, an extension of F{\omega} with row types, and give a denotational semantics for (stratified) R{\omega} in Agda.
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
TopicsScientific Computing and Data Management · Model-Driven Software Engineering Techniques · Advanced Database Systems and Queries
