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

Reply via email to