
Hm. Interesting point, I guess this is the same problem as the whole
orphan instances debate... I didn't think of the connection to that
problem. Still, I'm convinced there are situations where local
instances are *exactly* what we need, so there must be some way to
avoid this problem...
Regards,
Dominique
2014-02-10 16:03 GMT+01:00 Brandon Allbery
On Mon, Feb 10, 2014 at 5:33 AM, Dominique Devriese
wrote: Local instances were already considered by Wadler when he proposed type classes, but they are problematic to combine with type inference
Local instances have a bigger problem: you can use them to trivially violate invariants. Consider a local replacement for Ord on a Data.Map. They're not going to happen.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net