[Haskell-cafe] Inheritance and Wrappers

Henning Thielemann lemming at henning-thielemann.de
Mon Jan 31 21:39:03 CET 2011


On Mon, 31 Jan 2011, Brandon S Allbery KF8NH wrote:

> On 1/31/11 15:24 , Daniel Fischer wrote:
>> want. You could then also enable OverlappingInstances, which would allow
>> you to write other instances, but that extension is widely regarded as
>> dangerous (have to confess, I forgot what the dangers were, one was that
>> instance selection doesn't always do what you want/expect).
>
> Instance selection will still not look at the context, so multiple instances
> would complain about needing IncoherentInstances, and if you add *that* then
> it does something like taking the first matching instance it finds (again,
> ignoring the context completely).

Since the original poster classified himself as new to Haskell, I'm afraid 
that advanced and dangerous extensions are not the appropriate answer.



More information about the Haskell-Cafe mailing list