Interactive Type Debugging in Haskell

Peter J. Stuckey, Martin Sulzmann, Jeremy Wazny

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

41 Citations (Scopus)


In this paper we illustrate the facilities for type debugging of Haskell programs in the Chameleon programming environment. Chameleon provides an extension to Haskell supporting advanced and programmable type extensions. Chameleon maps the typing problem for a program to a system of constraints each attached to program code that generates the constraints. We use reasoning about constraint satisfiability and implication to find minimal justifications of type errors, and to explain unexpected types that arise. Through an interactive process akin to declarative debugging, a user can track down exactly where a type error occurs. The approach handles Hindley/Milner types with Haskell-style overloading. The Chameleon system provides a full implementation of our flexible type debugging scheme which can be used as a front-end to any existing Haskell system.

Original languageEnglish
Title of host publicationProceedings of the 2003 ACM SIGPLAN Haskell Workshop
Number of pages12
Publication statusPublished - 1 Dec 2003
Externally publishedYes
EventProceedings of the ACM SIGPLAN 2003 Haskell Workshop - Uppsala, Sweden
Duration: 28 Aug 200328 Aug 2003

Publication series

NameProceedings of the 2003 ACM SIGPLAN Haskell Workshop


ConferenceProceedings of the ACM SIGPLAN 2003 Haskell Workshop


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

Cite this