[Haskell-cafe] Re: Error message reform (was: Strange type error with associated type synonyms)

John Dorsey haskell at colquitt.org
Wed May 27 23:59:33 EDT 2009

> I like the "expected/inferred" vocabulary. Maybe it comes from being a
> native English speaker, but to me, it says "this is what we expected
> to get, but instead (through type inference), we got this type for
> this term".

As another native English speaker, I found "expected/inferred" very
intuitive when I was new to GHC, and to Haskell.  I even think that
"expected/inferred" helped me form my intuition about Haskell's type

There was one hang-up; it wasn't at all clear which referred to the term,
and which referred to the context.  (Really both types are inferred.) This
stopped bothering me when I decided it didn't matter which was which, and I
could generally find the problem pretty quickly just knowing the location
and the types involved.

Of course, I can see how the messages are probably much less useful to
non-native speakers, and that's quite important.  Something along the lines
of "inferred type <droozle> for term, but expected type <snidgit> in


More information about the Haskell-Cafe mailing list