Generic Programming with Extensible Data Types; Or, Making Ad Hoc Extensible Data Types Less Ad Hoc

07/17/2023
by   Alex Hubers, et al.
0

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ω, an extension of Fω with row types, and give a denotational semantics for (stratified) Rω in Agda.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/13/2021

An ML-style record calculus with extensible records

In this work, we develop a polymorphic record calculus with extensible r...
research
07/25/2017

An Executable Specification of Typing Rules for Extensible Records based on Row Polymorphism

Type inference is an application domain that is a natural fit for logic ...
research
01/11/2021

Mechanisation of Model-theoretic Conservative Extension for HOL with Ad-hoc Overloading

Definitions of new symbols merely abbreviate expressions in logical fram...
research
04/17/2023

Structural Subtyping as Parametric Polymorphism

Structural subtyping and parametric polymorphism provide a similar kind ...
research
06/17/2023

Achilles' Heels: Vulnerable Record Identification in Synthetic Data Publishing

Synthetic data is seen as the most promising solution to share individua...
research
01/26/2022

Polarized Subtyping

Polarization of types in call-by-push-value naturally leads to the separ...
research
03/12/2023

New Record-Breaking Condorcet Domains on 10 and 11 Alternatives

We report on discovering new record-breaking Condorcet domains on n=10 a...

Please sign up or login with your details

Forgot password? Click here to reset