Sums of products for mutually recursive datatypes: The appropriationist’s view on generic programming

Publication date

2018-09-27

Authors

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

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

Abstract

Generic programming for mutually recursive families of datatypes is hard. On the other hand, most interesting abstract syntax trees are described by a mutually recursive family of datatypes. We could give up on using that mutually recursive structure, but then we lose the ability to use those generic operations which take advantage of that same structure. We present a new approach to generic programming that uses modern Haskell features to handle mutually recursive families with explicit sum-of-products structure. This additional structure allows us to remove much of the complexity previously associated with generic programming over these types.

Keywords

Generic programming, Datatype, Haskell

Citation

Cacciari Miraldo, V & Serrano, A 2018, Sums of products for mutually recursive datatypes : The appropriationist’s view on generic programming. in Proceedings of the 3rd ACM SIGPLAN International Workshop on Type-Driven Development. Association for Computing Machinery, New York, pp. 65-77. https://doi.org/10.1145/3240719.3241786