English

Abstracting Extensible Recursive Functions

Programming Languages 2025-07-23 v2

Abstract

We explore recursive programming with extensible data types. Row types make the structure of data types first class, and can express a variety of type system features including record subtyping and combination of case branches. Our goal is the modular combination of recursive types and of recursive functions over them. The most significant challenge is in recursive function calls, which may need to account for new cases in a combined type. We introduce extensible histomorphisms, Mendler-style descriptions of recursive functions in which recursive calls can happen at larger types, and show that they provide expressive recursion over extensible data types. We formalize our approach in Rωμ\omega\mu, a row type theory with support for recursive terms and types.

Keywords

Cite

@article{arxiv.2410.11742,
  title  = {Abstracting Extensible Recursive Functions},
  author = {Alex Hubers and Apoorv Ingle and Andrew Marmaduke and J. Garrett Morris},
  journal= {arXiv preprint arXiv:2410.11742},
  year   = {2025}
}