Add test for #23743
This MR adds a test that checks the output of reifyInstances
on various types,
to ensure we don't accidentally change the behaviour w.r.t. #23743 (closed).
For example:
type Meta :: Type
type family Meta
type Meta1 :: Type -> Type
type family Meta1
type Meta1' :: Type -> Type
type family Meta1' a
type Skolem :: Type
data family Skolem
type C :: Type -> Constraint
class C a
instance C Int
instance C (Maybe a)
instance {-# OVERLAPPING #-} C a
We expect the following output for reifyInstances at class C with the given type argument:
-
Meta
all 3 instances (behaves like a metavariable) -
Skolem
only theC a
instance (behaves like a skolem type variable) -
Meta1 Meta
only theC a
andC (Maybe a)
instances, becauseMeta1
is generative -
Meta1' {Meta, Skolem}
all instances, becauseMeta1'
is a type family with arity 1 applied to one argument, so behaves like a normal metavariable