Generic programming of all kinds

Publication date

2018-09-17

Authors

Serrano Mena, A.ISNI 0000000434518529
Cacciari Miraldo, V.ISNI 0000000506342834

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

taverne

Abstract

Datatype-generic programming is a widely used technique to define functions that work regularly over a class of datatypes. Examples include deriving serialization of data, equality or even functoriality. The state-of-the-art of generic programming still lacks handling GADTs, multiple type variables, and some other features. This paper exploits modern GHC extensions, including <pre>TypeInType</pre>, to handle arbitrary number of type variables, constraints, and existentials. We also provide an Agda model of our construction that does not require Russel’s paradox, proving the construction is consistent.

Keywords

Generic programming, Haskell, Taverne, General Computer Science

Citation

Serrano, A & Cacciari Miraldo, V 2018, Generic programming of all kinds. in Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell. Association for Computing Machinery, pp. 41-54. https://doi.org/10.1145/3242744.3242745