Type Reconstruction for Type Classes
- 1 January 1995
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 5 (2) , 201-224
- https://doi.org/10.1017/s0956796800001325
Abstract
We study the type inference problem for a system with type classes as in the functional programming language Haskell. Type classes are an extension of ML-style polymorphism with overloading. We generalize Milner's work on polymorphism by introducing a separate context constraining the type variables in a typing judgement. This leads to simple type inference systems and algorithms which closely resemble those for ML. In particular, we present a new unification algorithm which is an extension of syntactic unification with constraint solving. The existence of principal types follows from an analysis of this unification algorithm.Keywords
This publication has 3 references indexed in Scilit:
- A theory of type polymorphism in programmingPublished by Elsevier ,2003
- Report on the programming language HaskellACM SIGPLAN Notices, 1992
- On the complexity of ML typability with overloadingPublished by Springer Nature ,1991