Marcin 'Qrczak' Kowalczyk writes: > [...] However in the following case there is an ambiguity that I > don't know how to resolve - overlapping instances don't solve what > they seemed to claim to solve: > > class A a where ... > class A a => B a where ... > class C a where ... > > instance A a => C a where ... > instance B a => C a where ... > > How to specify which C instance to apply? > ghc -fallow-{overlapping,undecidable}-instances complains > about the ambiguity. If Haskell allowed negation inside predicates, you could write: instance (A a, not B a) => C a where ...
- overlapping instances S.D.Mechveliani
- Re: overlapping instances Marcin 'Qrczak' Kowalczyk
- Re: overlapping instances Jeffrey R. Lewis
- Re: overlapping instances Marcin 'Qrczak' Kowalczyk
- Re: overlapping instances Jeffrey R. Lewis
- Re: overlapping instances Carl R. Witty
- Re: overlapping instances Jeffrey R. Lewis
- overlapping instances S.D.Mechveliani
- overlapping instances S.D.Mechveliani
- Re: overlapping instances Marcin 'Qrczak' Kowalczyk
- Re: overlapping instances Tom Pledger
- Re: overlapping instances Jeffrey R. Lewis
- overlapping instances S.D.Mechveliani
- Re: overlapping instances Marcin 'Qrczak' Kowalczyk
- overlapping instances S.D.Mechveliani
- Re: overlapping instances Marcin 'Qrczak' Kowalczyk
- Re: overlapping instances Carl R. Witty
- Re: overlapping instances Jeffrey R. Lewis
- Re: overlapping instances Fergus Henderson
- Re: overlapping instances Jeffrey R. Lewis
- RE: overlapping instances Brian Boutel