Ticket #4494 (closed bug: fixed)
Another regression with type families
Program (compile with ScopedTypeVariables):
type family H s a b class D (G v) => C v where type G v type F v foo :: v -> H (F v) (G v) v class D s where bar :: (forall t. Maybe t -> a) -> s -> H a s r -> r call :: forall v. C v => F v -> v call x = bar (\_ -> x) (undefined :: G v) (foo (undefined :: v)) bar' :: C v => (forall t. Maybe t -> F v) -> G v -> H (F v) (G v) v -> v bar' = bar
The current head (even with today's typechecker patch) complains:
Could not deduce (H a (G v) v ~ H (F v) (G v) v) from the context (C v)
But if I change bar to bar' in the rhs of foo, it all works fine. 6.12.3 accepts both programs.