Type-safe cast: (functional pearl)
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
A lightweight implementation of generics and dynamics
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Guarded recursive datatype constructors
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
The role of type equality in meta-programming
The role of type equality in meta-programming
Generalized algebraic data types and object-oriented programming
OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Stratified type inference for generalized algebraic data types
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Programming monads operationally with Unimo
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
A constraint-based approach to guarded algebraic data types
ACM Transactions on Programming Languages and Systems (TOPLAS)
Complete and decidable type inference for GADTs
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
A lean specification for GADTs: system F with first-class equality proofs
Higher-Order and Symbolic Computation
Outsidein(x) modular type inference with local assumptions
Journal of Functional Programming - Dedicated to ICFP 2009
Hi-index | 0.00 |
In the GADT (Generalized Algebraic Data Types) type system, a pattern-matching branch can draw type information from both the scrutinee type and the data constructor type. Even though the type system can handle complex interactions between the two types, most programs require only simple interactions in the form of parametric instantiation and type indexing. To explore the tradeoffs related to GADT patterns, we define the Pointwise GADT type system, which restricts GADTs to the common case of parametric instantiation and type indexing. The Pointwise GADT type system still accepts a wide range of GADT programs, while rejecting a pathological function whose pattern-matching branches can make arbitrarily different assumptions about the type environment. We also state and prove several properties of the type system, which we speculate might be useful in helping researchers design better type inference algorithms.