A Formal Comparison of Approaches to Datatype-Generic Programming
Jos\'e Pedro Magalh\~aes, Andres L\"oh

TL;DR
This paper provides a formal comparison of various datatype-generic programming approaches, formalising them in Agda and establishing theorems that relate and convert between these approaches to enhance understanding and interoperability.
Contribution
It introduces a formal framework in Agda for comparing and relating different datatype-generic programming approaches, including proofs of inclusion and conversion.
Findings
Formalised approaches in Agda
Proved theorems relating different approaches
Facilitated conversion between approaches
Abstract
Datatype-generic programming increases program abstraction and reuse by making functions operate uniformly across different types. Many approaches to generic programming have been proposed over the years, most of them for Haskell, but recently also for dependently typed languages such as Agda. Different approaches vary in expressiveness, ease of use, and implementation techniques. Some work has been done in comparing the different approaches informally. However, to our knowledge there have been no attempts to formally prove relations between different approaches. We thus present a formal comparison of generic programming libraries. We show how to formalise different approaches in Agda, including a coinductive representation, and then establish theorems that relate the approaches to each other. We provide constructive proofs of inclusion of one approach in another that can be used to…
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.
