Confusing defaulting in error messages
Consider the currently accepted output for `T18357a`:
```
T18357a.hs:9:10: error: [GHC-25897]
• Couldn't match kind ‘r’ with ‘LiftedRep’
Expected a type, but ‘Int’ has kind ‘*’
```
Very confusing: "expected a type, but `Int` has kind `Type`". The actual error message we are supposed to get is:
```
Expected kind ‘TYPE r’, but ‘Int’ has kind ‘*’
```
and the issue is that the `TYPE r` got pretty-printed as `Type` instead.
A similar example is in the currently accepted output of `T16074`:
```
Couldn't match type ‘a’ with ‘b’
Expected: TYPE a :~: TYPE b
Actual: TYPE a :~: TYPE a
‘a’ is a rigid type variable bound by
the type signature for:
foo :: * :~: *
at T16074.hs:9:1-24
‘b’ is a rigid type variable bound by
the type signature for:
foo :: * :~: *
```
when it should be:
```
Couldn't match type ‘a’ with ‘b’
Expected: TYPE a :~: TYPE b
Actual: TYPE a :~: TYPE a
‘a’ is a rigid type variable bound by
the type signature for:
foo :: forall (a :: RuntimeRep) (b :: RuntimeRep).
TYPE a :~: TYPE b
at T16074.hs:9:1-24
‘b’ is a rigid type variable bound by
the type signature for:
foo :: forall (a :: RuntimeRep) (b :: RuntimeRep).
TYPE a :~: TYPE b
```
This is essentially the same as #26335, but for `RuntimeRep` instead of linearity.
I am fixing in !14357.
issue