overlapping instances and constraints

Niklas Broberg niklas.broberg at gmail.com
Tue Feb 28 18:22:02 EST 2006


Claus Reinke wrote:
> most of us would be happy if instance contexts
> would be required to uniquely determine the instance to be
> chosen, a rather conservative extension of current practice.

I'm not so sure about the "most of us", as you note yourself the
defaulting pattern is quite popular (and useful). I certainly couldn't
live without it. And even that aside, I'd much rather have the type
system infer a "most particular" instance than to have to specify that
myself.

Also IMHO, adding a new construct (type (in)equality) to the language
is a lot more obtrusive than to do something meaningful of the
constructs that the language already provides. So I'd have issues with
"conservative" as well...

Of course, this is all from the perspective of a user, not a type
inference engine implementor... ;-)

/Niklas


More information about the Haskell-prime mailing list