[Haskell-cafe] Closed Classes
MR K P SCHUPKE
k.schupke at imperial.ac.uk
Fri Aug 13 06:33:53 EDT 2004
>add the extra rule that if there is only one possible instance the
>compiler should use it.
Yes, I think that is what I am saying. The closed class assumption alters
the types of exported functions by applying improvements to them - that is
not what I meant at all.
I think what is confusing me is the 'possible' part. I was thinking about
applying type improvement to effectively determine which instance to choose.
(I think this is an error on my part - I get the impression type improvement
cannot be used for this) ... would a possibel instance be something like:
assuming you are resolving instances lazily at the last possible
moment, you try to unify all instances and if one and
only one unifies - use that instance.
More information about the Haskell-Cafe