Abstract
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.
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 language | English |
---|---|
Publisher | Department of Information and Computing Sciences, Utrecht University |
Number of pages | 11 |
Publication status | Published - 2004 |
Publication series
Name | Technical Report Series |
---|---|
No. | UU-CS-2004-039 |