[Haskell-cafe] manage effects in a DSL
Dominique Devriese
dominique.devriese at cs.kuleuven.be
Mon Feb 10 15:55:52 UTC 2014
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 <allbery.b at gmail.com>:
> On Mon, Feb 10, 2014 at 5:33 AM, Dominique Devriese
> <dominique.devriese at 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.
>
> --
> brandon s allbery kf8nh sine nomine associates
> allbery.b at gmail.com ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
More information about the Haskell-Cafe
mailing list