The last two instances have a conflicting union. Let me use completely different variable names:
C (ac (d,e)) (bc (d,e)) e vs. C (ac (d,e)) (bc (d,e)) (d,e)
In particular, your l from the third instance can be unified with a constructor of a type that already has an argument.
Changing your j to i does the latter instead:
C (ac (d,e)) (bc (d,e)) c
I still do not understand why this does not give a complaint. Perhaps this is because you can assign types such as c = e , but not such as e = (d,e) (which will give an infinite type that Haskell does not allow), but this still seems dubious. Perhaps this is even a GHC bug.
Other combinations of instances do not conflict, because when you try to combine them, you find yourself in contradictions similar to the above e = (d,e) , but in independent parts, so they cannot match.
source share