10 Feb
2014
10 Feb
'14
7:31 p.m.
On 10 Feb 2014, at 19:03, Brandon Allbery <allbery.b@gmail.com> wrote:
On Mon, Feb 10, 2014 at 5:33 AM, Dominique Devriese <dominique.devriese@cs.kuleuven.be> 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.
You can easily achieve the same thing with orphan instances, and they only result in a compiler warning.