Improving type-error messages in functional languages
Bastiaan Heeren, Johan T. Jeuring, Doaitse Swierstra, P.A. Alcocer · Utrecht University Repository (Utrecht University) · 2002
Although type systems do detect type errors in programs, they often produce uninformative error messages, that hardly give information about how to repair a program. One important shortcoming is the inability to highlight the most likely cause for the detected inconsistency. This paper presents a type inferencer with improved error reporting facilities, based on the construction of type constraints. Unification of types is replaced by the construction of constraint graphs. This approach increases the chance to report the actual source of a type conflict, resulting in more useful error messages.