Generic Programming with Fixed Points for Mutually Recursive Datatypes

被引:0
|
作者
Yakushev, Alexey Rodriguez [1 ]
Holderrnans, Stefan [1 ]
Loh, Andres [1 ]
Jeuring, Johan [1 ]
机构
[1] Vector Fabr BV, NL-5611 KN Eindhoven, Netherlands
关键词
D O I
暂无
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Many datatype-generic functions need access to the recursive positions in the structure of the datatype, and therefore adopt a fixed point view on datatypes. Examples include variants of fold that traverse the data following the recursive structure, or the Zipper data structure that enables navigation along the recursive positions. However, Hindley-Milner-inspired type systems with algebraic datatypes make it difficult to express fixed points for anything but regular datatypes. Many real-life examples such as abstract syntax trees are in fact systems of mutually recursive datatypes and therefore excluded. Using Haskell's GADTs and type families, we describe a technique that allows a fixed-point view for systems of mutually recursive datatypes. We demonstrate that our approach is widely applicable by giving several examples of generic functions for this view, most prominently the Zipper.
引用
收藏
页码:233 / 244
页数:12
相关论文
共 50 条
  • [1] Generic Programming with Fixed Points for Mutually Recursive Datatypes
    Yakushev, Alexey Rodriguez
    Holdermans, Stefan
    Loh, Andres
    Jeuring, Johan
    [J]. ACM SIGPLAN NOTICES, 2009, 44 (8-9) : 233 - 244
  • [2] Sums of Products for Mutually Recursive Datatypes The Appropriationist's View on Generic Programming
    Miraldo, Victor Cacciari
    Serrano, Alejandro
    [J]. PROCEEDINGS OF THE 3RD ACM SIGPLAN INTERNATIONAL WORKSHOP ON TYPE-DRIVEN DEVELOPMENT (TYDE '18), 2018, : 65 - 77
  • [3] Generic Programming for Indexed Datatypes
    Magalhaes, Jose Pedro
    Jeuring, Johan
    [J]. WGP 11: PROCEEDINGS OF THE 2011 ACM SIGPLAN WORKSHOP ON GENERIC PROGRAMMING, 2011, : 37 - 46
  • [4] Practical Generic Programming over a Universe of Native Datatypes
    Escot, Lucas
    Cockx, Jesper
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2022, 6 (ICFP):
  • [5] Generic properties of datatypes
    Backhouse, R
    Hoogendijk, P
    [J]. GENERIC PROGRAMMING, 2003, 2793 : 97 - 132
  • [6] Generic ontology of datatypes
    Panov, Pance
    Soldatova, Larisa N.
    Dzeroski, Saso
    [J]. INFORMATION SCIENCES, 2016, 329 : 900 - 920
  • [7] Recursive Definitions and Fixed-Points
    Ferreira, Francicleber Martins
    Martins, Ana Teresa
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2009, 247 : 19 - 37
  • [8] Typed compilation of recursive datatypes
    Vanderwaart, JC
    Dreyer, D
    Petersen, L
    Crary, K
    Harper, R
    Cheng, P
    [J]. ACM SIGPLAN NOTICES, 2003, 38 (03) : 98 - 108
  • [9] Monotone Relations, Fixed Points and Recursive Definitions
    Czelakowski, Janusz
    [J]. TOWARDS MATHEMATICAL PHILOSOPHY, 2009, 28 : 125 - 164
  • [10] GENERIC EXISTENCE OF FIXED POINTS FOR A CLASS OF NONEXPANSIVE MAPPINGS
    Reich, Simeon
    Zaslavski, Alexander J.
    [J]. JOURNAL OF NONLINEAR AND CONVEX ANALYSIS, 2022, 23 (04) : 793 - 800