How to make ad-hoc polymorphism less ad hoc
POPL '89 Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Type inference for polymorphic references
Information and Computation
Theorem proving using equational matings and rigid E-unification
Journal of the ACM (JACM)
Polymorphic type inference and abstract data types
ACM Transactions on Programming Languages and Systems (TOPLAS)
Simple imperative polymorphism
Lisp and Symbolic Computation - Special issue on state in programming languages (part I)
ACM Transactions on Programming Languages and Systems (TOPLAS)
Type inference with constrained types
Theory and Practice of Object Systems - Special issue on foundations of object-oriented languages
Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Guarded recursive datatype constructors
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Type Classes with Functional Dependencies
ESOP '00 Proceedings of the 9th European Symposium on Programming Languages and Systems
Shostak's Congruence Closure as Completion
RTA '97 Proceedings of the 8th International Conference on Rewriting Techniques and Applications
A Completion-Based Method for Mixed Universal and Rigid E-Unification
CADE-12 Proceedings of the 12th International Conference on Automated Deduction
Abstract Congruence Closure and Specializations
CADE-17 Proceedings of the 17th International Conference on Automated Deduction
Haskell '03 Proceedings of the 2003 ACM SIGPLAN workshop on Haskell
Haskell '03 Proceedings of the 2003 ACM SIGPLAN workshop on Haskell
Qualified types: theory and practice (ordering relation)
Qualified types: theory and practice (ordering relation)
A general framework for hindley/milner type systems with constraints
A general framework for hindley/milner type systems with constraints
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
LICS '05 Proceedings of the 20th Annual IEEE Symposium on Logic in Computer Science
Scrap your boilerplate with class: extensible generic functions
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
ACM Transactions on Programming Languages and Systems (TOPLAS)
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
A constraint-based approach to guarded algebraic data types
ACM Transactions on Programming Languages and Systems (TOPLAS)
System F with type equality coercions
TLDI '07 Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation
Practical type inference for arbitrary-rank types
Journal of Functional Programming
Understanding functional dependencies via constraint handling rules
Journal of Functional Programming
Type checking with open type functions
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Proceedings of the 3rd workshop on Programming languages meets program verification
Complete and decidable type inference for GADTs
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementation
Pointwise generalized algebraic data types
Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementation
Reflections on the Work of C.A.R. Hoare
Reflections on the Work of C.A.R. Hoare
Generative type abstraction and type-level computation
Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A framework for extended algebraic data types
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
Proof-producing congruence closure
RTA'05 Proceedings of the 16th international conference on Term Rewriting and Applications
Principal type inference for GHC-Style multi-parameter type classes
APLAS'06 Proceedings of the 4th Asian conference on Programming Languages and Systems
The implicit calculus: a new foundation for generic programming
Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation
A pattern for almost homomorphic functions
Proceedings of the 8th ACM SIGPLAN workshop on Generic programming
Equality proofs and deferred type errors: a compiler pearl
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Fixing idioms: a recursion primitive for applicative DSLs
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
CakeML: a verified implementation of ML
Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
Hi-index | 0.00 |
Advanced type system features, such as GADTs, type classes and type families, have proven to be invaluable language extensions for ensuring data invariants and program correctness. Unfortunately, they pose a tough problem for type inference when they are used as local type assumptions. Local type assumptions often result in the lack of principal types and cast the generalisation of local let-bindings prohibitively difficult to implement and specify. User-declared axioms only make this situation worse. In this paper, we explain the problems and-perhaps controversially-argue for abandoning local let-binding generalisation. We give empirical results that local let generalisation is only sporadically used by Haskell programmers. Moving on, we present a novel constraint-based type inference approach for local type assumptions. Our system, called OutsideIn(X), is parameterised over the particular underlying constraint domain X, in the same way as HM(X). This stratification allows us to use a common metatheory and inference algorithm. OutsideIn(X) extends the constraints of X by introducing implication constraints on top. We describe the strategy for solving these implication constraints, which, in turn, relies on a constraint solver for X. We characterise the properties of the constraint solver for X so that the resulting algorithm only accepts programs with principal types, even when the type system specification accepts programs that do not enjoy principal types. Going beyond the general framework, we give a particular constraint solver for X = type classes + GADTs + type families, a non-trivial challenge in its own right. This constraint solver has been implemented and distributed as part of GHC 7.