Note [Recording coherence information in `PotentialUnifiers`]

GHC/Core/InstEnv.hs:1130 compiler

When we find a matching instance, there might be other instances that
could potentially unify with the goal. For `INCOHERENT` instances, we
don't care (see step (IL6) in Note [Rules for instance lookup]).
But if we have potentially unifying coherent instance, we
report these `OneOrMoreUnifiers` so that `matchInstEnv` can go down
the `NotSure` route.

If this hurdle is passed, i.e. we have a unique solution up to
`INCOHERENT` instances, the specialiser needs to know if that unique
solution is canonical or not (see Note [Coherence and specialisation:
overview] for why we care at all). So when the set of potential
unifiers is empty, we record in `NoUnifiers` if the one solution is
`Canonical`.

For example, suppose we have:

  class C x y
  instance C a Bool                   -- (1)
  instance {-# INCOHERENT #

References 1

Referenced by 4