[Haskell-cafe] Typeclass resolution errors quite puzzling

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Mon Aug 15 13:48:58 UTC 2016

On Mon, Aug 15, 2016 at 03:38:45PM +0200, Francesco Ariis wrote:
> On Mon, Aug 15, 2016 at 02:35:15PM +0100, Tom Ellis wrote:
> > My complaint is about the confusing error message, not the failure to
> > type check.
> For reference, feeding that program to Hugs (which I usually
> find a bit better in terms of error reporting) leads to:
>     ERROR "prova.hs":5 - Instance of Eq B required for definition of main
> Slightly clearer but not much. I don't have UHC handy to test
> its error messages!

I find that message equally puzzling.  It seems to me that the most helpful message
would have to mention that Eq B is required to satisfy Eq A.

More information about the Haskell-Cafe mailing list