A Simplification of Girard's Paradox
TLCA '95 Proceedings of the Second International Conference on Typed Lambda Calculi and Applications
A Finite Axiomatization of Inductive-Recursive Definitions
TLCA '99 Proceedings of the 4th International Conference on Typed Lambda Calculi and Applications
TYPES '00 Selected papers from the International Workshop on Types for Proofs and Programs
Journal of Functional Programming
Universes for generic programs and proofs in dependent type theory
Nordic Journal of Computing
PLPV '07 Proceedings of the 2007 workshop on Programming languages meets program verification
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
Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
Exploring the regular tree types
TYPES'04 Proceedings of the 2004 international conference on Types for Proofs and Programs
Epigram: practical programming with dependent types
AFP'04 Proceedings of the 5th international conference on Advanced Functional Programming
Hi-index | 0.00 |
Generic programming is about writing a single function that does something different for each type. In most languages one cannot case over the structure of types. So in such languages generic programming is accomplished by defining a universe, a data structure isomorphic to some subset of the types supported by the language, and performing a case analysis over this datatype instead. Such functions support a limitied level of genericity, limited to the subset of types that the universe encodes. The key to full genericity is defining a rich enough universe to encode all types in the language. In this paper we show how to define a universe with a predicative hierarchy of types, encoding a finite set of base types (including dependent products and sums), and an infinite set of user defined datatypes. We demonstrate that such a system supports a much broader notion of generic programming, along with a serendipitous extension to the usefulness of user defined datatypes with existential arguments.