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.
Original language | English |
---|---|
Title of host publication | Proceedings of the 3rd ACM SIGPLAN International Workshop on Type-Driven Development |
Place of Publication | New York |
Publisher | Association for Computing Machinery |
Pages | 65-77 |
ISBN (Print) | 978-1-4503-5825-5 |
DOIs | |
Publication status | Published - 27 Sept 2018 |
Keywords
- Generic programming
- Datatype
- Haskell