[Haskell-cafe] manage effects in a DSL

MigMit miguelimo38 at yandex.ru
Mon Feb 10 19:31:08 UTC 2014


On 10 Feb 2014, at 19:03, Brandon Allbery <allbery.b at gmail.com> wrote:

> 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.

You can easily achieve the same thing with orphan instances, and they only result in a compiler warning.


More information about the Haskell-Cafe mailing list