Simon Peyton-Jones wrote:
    Given "instance C T where ...", for any method 'm' not
    defined by "...":
        for every class D of which C is a superclass
        where there is an instance for (D T)
        see if the instance gives a binding for 'm'
    If this search finds exactly one binding, use it,
        otherwise behave as now

A better rule would be:

If this search finds exactly one binding that is
minimal in the partial ordering defined by the
superclass hierarchy, use it, otherwise behave
as now.

Would that be much harder to implement?

-Yitz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to