Hostname: page-component-89b8bd64d-x2lbr Total loading time: 0 Render date: 2026-05-13T08:47:19.204Z Has data issue: false hasContentIssue false

Type Reconstruction for Type Classes1

Published online by Cambridge University Press:  07 November 2008

Tobias Nipkow
Affiliation:
Institut für Informatik, Technische Universität München, 80290 München, Germany. email: {nipkow, prehofer}@informatik.tu-muenchen.de
Christian Prehofer
Affiliation:
Institut für Informatik, Technische Universität München, 80290 München, Germany. email: {nipkow, prehofer}@informatik.tu-muenchen.de
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 1995
Submit a response

Discussions

No Discussions have been published for this article.