Generic Programming with Extensible Data Types

被引:0
|
作者
Hubers, Alex [1 ]
Morris, J. Garrett [1 ]
机构
[1] Univ Iowa, Dept Comp Sci, 14 MacLean Hall, Iowa City, IA 52240 USA
基金
美国国家科学基金会;
关键词
generic programming; extensible data types; row types; row polymorphism; qualified types;
D O I
10.1145/3607843
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:29
相关论文
共 50 条
  • [1] Generic Programming with Extensible Data Types: Or, Making Ad Hoc Extensible Data Types Less Ad Hoc
    Hubers A.
    Morris J.G.
    [J]. Proceedings of the ACM on Programming Languages, 2023, 7 (ICFP)
  • [2] A generic and extensible tool for marking programming assignments
    Tremblay, G
    Guérin, F
    Pons, A
    [J]. IASTED INTERNATIONAL CONFERENCE ON EDUCATION AND TECHNOLOGY, 2005, : 55 - 60
  • [3] Types and Semantics for Extensible Data Types
    van der Rest, Cas
    Poulsen, Casper Bach
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, APLAS 2023, 2023, 14405 : 46 - 66
  • [4] Oto, a generic and extensible tool for marking programming assignments
    Tremblay, G.
    Guerin, F.
    Pons, A.
    Salah, A.
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2008, 38 (03): : 307 - 333
  • [5] Generic programming with dependent types
    Altenkirch, Thorsten
    McBride, Conor
    Morris, Peter
    [J]. DATATYPE-GENERIC PROGRAMMING, 2007, 4719 : 209 - 257
  • [6] Abstracting Extensible Data Types
    Morris, J. Garrett
    McKinna, James
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):
  • [7] PROGRAMMING ABSTRACT-DATA-TYPES, ITERATORS AND GENERIC MODULES IN C
    IANNELLO, G
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 1990, 20 (03): : 243 - 260
  • [8] Towards generic programming with sized types
    Abel, Andreas
    [J]. MATHEMATICS OF PROGRAM CONSTRUCTION, 2006, 4014 : 10 - 28
  • [9] Between Types and Tables Using Generic Programming for Automated Mapping between Data Types and Relational Databases
    Lijnse, Bas
    Plasmeijer, Rinus
    [J]. IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES, 2011, 5836 : 272 - 290
  • [10] A Generic, Extensible Data Model for Trajectory Determination Systems
    Navarro, Jose A.
    Eulalia Pares, M.
    Colomina, Ismael
    Blazquez, Marta
    [J]. GISTAM: PROCEEDINGS OF THE 3RD INTERNATIONAL CONFERENCE ON GEOGRAPHICAL INFORMATION SYSTEMS THEORY, APPLICATIONS AND MANAGEMENT, 2017, : 17 - 25