Friends, in sending my message below, I should also have sent a link to
https://ghc.haskell.org/trac/ghc/ticket/9242#comment:25
Comment 25 describes the semantics of OVERLAPPING/OVERLAPPABLE etc, which I
signally failed to do in my message below, leading to confusion in the follow
up
Andreas, remember that GHC 7.8 already implements (essentially) the same
algorithm. The difference is that 7.8 offers only the brutal
-XOverlappingInstances to control it. In your example of the decision you make
when writing
instance Bla a = Bla [a]
vs
instance {-# OVERLAPPABLE #-}
Now if only we could somehow find a way to do the same thing for
AllowAmbiguousTypes. :)
I have a 2500 line file that I'm forced to turn on AllowAmbiguousTypes in
for 3 definitions, and checking that I didn't accidentally make something
else ambiguous to GHC's eyes is a rather brutal affair. (I
| My proposal is to have just one pragma, e.g. OVERLAP, that allows
| overlap in either direction. But if you have examples whether the
| extra sophistication introduced by a separation into OVERLAPPABLE and
| OVERLAPPING is needed, I am happy to go along...
Great! As you'll see the proposal,