PolyP—a polytypic programming language extension
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
MPC '98 Proceedings of the Mathematics of Program Construction
MPC '02 Proceedings of the 6th International Conference on Mathematics of Program Construction
Journal of Functional Programming
Clowns to the left of me, jokers to the right (pearl): dissecting data structures
Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A lightweight approach to datatype-generic rewriting
Proceedings of the ACM SIGPLAN workshop on Generic programming
Generic programming with fixed points for mutually recursive datatypes
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Arity-generic datatype-generic programming
Proceedings of the 4th ACM SIGPLAN workshop on Programming languages meets program verification
Generic programming with dependent types
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Dependently typed programming in Agda
AFP'08 Proceedings of the 6th international conference on Advanced functional programming
Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
The right kind of generic programming
Proceedings of the 8th ACM SIGPLAN workshop on Generic programming
Proceedings of the 9th ACM SIGPLAN workshop on Generic programming
Hi-index | 0.00 |
Much has been said and done about generic programming approaches in strongly-typed functional languages such as Haskell and Agda. Different approaches use different techniques and are better or worse suited for certain uses, depending on design decisions such as generic view, universe size and complexity, etc. We present a simple and intuitive yet powerful approach to generic programming in Agda using indexed functors. We show a universe incorporating fixed points that supports composition, indexing, and isomorphisms, and generalizes a number of previous approaches to generic programming with fixed points. Our indexed functors come with a map operation which obeys the functor laws, and associated recursion morphisms. Albeit expressive, the universe remains simple enough to allow defining standard recursion schemes as well as decidable equality. As for type-indexed datatypes, we show how to compute the type of one-hole contexts and define the generic zipper.