Note [Do not unify representational equalities]

GHC/Tc/Solver/Equality.hs:2838 compiler 1 ticket

Consider   [W] alpha ~R# b
where alpha is touchable. Should we unify alpha := b?

Certainly not!  Unifying forces alpha and be to be the same; but they
only need to be representationally equal types.

For example, we might have another constraint [W] alpha ~# N b
where
  newtype N b = MkN b
and we want to get alpha := N b.

See also #15144, which was caused by unifying a representational
equality.

Note that it does however make sense to perform such unifications, as a last
resort, when doing top-level defaulting.
See Note [Defaulting representational equalities].

References 1

Referenced by 3