Note [Limited defaulting in the ambiguity check]

GHC/Tc/Solver/Default.hs:114 compiler 1 ticket

When simplifying constraints for the ambiguity check, we don't want full
defaulting.  E.g. #11947 was an example:
   f :: Num a => Int -> Int
This is ambiguous of course, but we don't want to default the (Num
alpha) constraint to (Num Int)!  Doing so gives a defaulting warning,
but no error.

But we still do

* tryConstraintDefaulting.  Example in T10009 where we have this type signature
    f :: (UnF (F b) ~ b) => F b -> ()
  We finish up with an equality that is a member of it's
    [W] hole{co_aF0} {rewriters: {co_aF0}}:: b_aES[tau:1] ~# b_aEP[sk:1]
  It is not unified because of (REWRITERS) in Note [Unification preconditions]
  in GHC.Tc.Utils.Unify

  (`tryConstraintDefaulting` defaults call-stack and exception constraint
  as well as equalities; but in the case of the ambiguity check we will
  only see equality constraints.  Does not seem worth making a version
  of `tryConstraintDefaulting` that looks only for equalities.)

* tryUnsatisfiableGivens: see Wrinkle [Ambiguity] under point (C) of
  Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors.

References 2

Referenced by 2