Improving type error diagnosis

Peter J. Stuckey, Martin Sulzmann, Jeremy Wazny

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

28 Citations (Scopus)


We present a number of methods for providing improved type error reports in the Haskell and Chameleon programming languages. We build upon our previous work [19] where we first introduced the idea of discovering type errors by translating the typing problem into a constraint problem and looking for minimal unsatisfiable subsets of constraints. This allowed us to find precise sets of program locations which are in conflict with each other. Here we extend this approach by extracting additional useful information from these minimal unsatisfiable sets. This allows us to report errors as conflicts amongst a number of possible, candidate types. The advantage of our approach is that it offers implementors the flexibility to employ heuristics to select where, amongst all the locations involved, an error should be reported. In addition, we present methods for providing improved subsumption and ambiguity error reporting.

Original languageEnglish
Title of host publicationProceedings of the ACM SIGPLAN 2004 Haskell Workshop, Haskell'04
Number of pages12
Publication statusPublished - 1 Dec 2004
Externally publishedYes
EventProceedings of the ACM SIGPLAN 2004 Haskell Workshop, Haskell'04 - Snowbird, UT, United States of America
Duration: 22 Sept 200422 Sept 2004

Publication series

NameProceedings of the ACM SIGPLAN 2004 Haskell Workshop, Haskell'04


ConferenceProceedings of the ACM SIGPLAN 2004 Haskell Workshop, Haskell'04
Country/TerritoryUnited States of America
CitySnowbird, UT


  • Constraints
  • Hindley/Milner
  • Overloading
  • Type classes
  • Type debugging
  • Type inference

Cite this