A first attempt at type class directives

Bastiaan Heeren, Jurriaan Hage

Research output: Book/ReportOther report


Building on earlier work on type inference directives for scripting
a compiler to improve type error messages, we present extensions
to those directives to deal with type classes. Our work is mainly
motivated by the need for better type error messages, especially for domain specific languages. Type inference directives can bridge the gap between embedded domain specific languages and Haskell by their ability to lift error messages to the conceptual level of the domain, without a need to know anything about how the compiler works on the inside.
We consider both special type class directives, which help to improve type error messages in the presence of type classes, and we show how existing type inference directives can be extended to cope with overloading. We also describe a heuristic where type class information is used to pinpoint more precisely the most likely source of a unification error in a program.
Original languageEnglish
PublisherDepartment of Information and Computing Sciences, Utrecht University
Number of pages11
Publication statusPublished - 2004

Publication series

NameTechnical Report Series


Dive into the research topics of 'A first attempt at type class directives'. Together they form a unique fingerprint.

Cite this