Type Class Directives

Bastiaan Heeren and Jurriaan Hage

The goal of this paper is to improve the type error messages in the presence of Haskell 98 type classes, in particular for the non-expert user. As a language feature, type classes are very pervasive, and strongly influence what is reported and when, even in relatively simple programs. We propose four type class directives, and specialized type rules, to lend high-level support to compilers to improve the type error messages. Both have been implemented, and can be used to easily modify the behavior of the type inference process.

In Practical Aspects of Declarative Languages, volume 3350 of Lecture Notes in Computer Science, pages 253-267.
Download paper (© 2005, Springer Berlin Heidelberg, doi)