Generalizing Hindley-Milner Type Inference Algorithms

Bastiaan Heeren, Jurriaan Hage, S. Doaitse Swierstra

Research output: Book/ReportOther report


Type inferencing according to the standard algorithms W and M often yields uninformative error messages. Many times, this is a consequence of a bias inherent in the algorithms. The method developed here is to first collect constraints from the program, and to solve these afterwards, possibly under the influence of a heuristic. We show the soundness and completeness of our algorithm. The algorithms W and M turn out to be deterministic instances of our method, giving the correctness for W and M with respect to the Hindley-Milner typing rules for free. We also show that our algorithm is more flexible, because it naturally allows the generation of multiple messages.
Original languageEnglish
PublisherDepartment of Information and Computing Sciences, Utrecht University
Number of pages28
Publication statusPublished - 8 Jul 2002

Publication series

NameTechnical Report Series
ISSN (Print)0924-3275


Dive into the research topics of 'Generalizing Hindley-Milner Type Inference Algorithms'. Together they form a unique fingerprint.

Cite this