Draft: Use Concrete# for defaulting of RuntimeReps
This MR attempts to address the two issues outlined in #17201.
f1 :: forall (p :: RuntimeRep -> Type) (r :: RuntimeRep). p r -> p r f1 x = x g1 = f1
We want to infer the same type for
g1 as for
f1, instead of the
p LiftedRep -> p LiftedRep we get currently, because of
f x = x g = f 0#
we would like to accept this with
f :: forall (a :: TYPE IntRep). a -> a
When inferring a type:
- Make type variables that appear within a
Concrete#constraints monoTyVars in
GHC.Tc.Solver.decideMonoTyVars. This means we don't quantify over them.
- After constraint solving, we do typeclass-like defaulting for