> | Finally, I tried maxBound::Integer, and I don't understand why I get
> | *this* error message:
> | 
> |   Prelude> maxBound::Integer
> |   ERROR: Unresolved overloading
> |   *** type       : Bounded Integer => Integer
> |   *** expression : maxBound
> | 
> | Oh, but I just saw that it's the same with 1.3c, so this is not a bug, 
> | just something to work on...
> 
> Can you clarify what you mean here?  I don't see whay you would expect
> us to be working on.  The error message is different from the one that
> you would have seen in previous releases of 1.4 ("Integer is not an
> instance of Bounded"); the new message says the same thing, plus more,
> because it also gives some context, like the part of the type to the
> right of the => symbol.  The inferred type "Bounded Integer => Integer"
> means that, if the constraint (Bounded Integer) were satisfied, then
> maxBound::Integer would return an integer.  But alas, the overloading
> cannot be resolved because the constraint cannot be solved, so an
> error is reported.  This is a very simple example, of course.  In
> practice, the types involved could be more complex, and might even
> involve multiple parameter classes.  That's why a more informative
> error message is needed.

I always thought that resolving in this context means figure out what
a type (constructor) variable means, and  Bounded Integer => Integer 
clearly has none. So indeed I expected something like "not an instance 
of", but I guess I can get used to understanding "Unresolved
overloading" instead. Showing the infered type is definitely a good
idea.


Christian Sievers

Reply via email to