Type Reconstruction for Type Classes 1
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. 1
Citations
| 1463 | The definition of Standard ML – Milner, Tofte, et al. - 1990 |
| 801 | A theory of type polymorphism in programming – Milner - 1978 |
| 215 | Report on the Programming Language Haskell, A Non-strict, Purely Functional Language – Hudak, Jones, et al. - 1992 |
| 90 | The De nition of Standard ML – Milner, Tofte, et al. - 1990 |
| 88 | A Simple Applicative Language: MINI-ML – Clement - 1986 |
| 54 | An experimental applicative language – Hope - 1980 |
| 38 | Parametric Type Classes – Chen, Hudak, et al. - 1992 |
| 27 | Type checking type classes – Nipkow, Prehofer - 1993 |
| 24 | Type classes and overloading resolution via order-sorted unification – Nipkow, Snelting - 1991 |
| 16 | An approach to overloading with polymorphism – Blott - 1991 |
| 14 | On the complexity of ML typability with overloading – Volpano, Smith - 1991 |
| 11 | Quali ed types: Theory and practice – Jones - 1992 |
| 2 | On the complexity ofMLtypability with overloading – Nipkow, Volpano, et al. - 1991 |
| 1 | Qualified types: Theory and practice. D.Phil – Jones - 1992 |

