Type inference for data family newtype instances
This patch addresses #23408, a tricky case with data family newtype instances. Consider type family TF a where TF Char = Bool data family DF a newtype instance DF Bool = MkDF Int and [W] Int ~R# DF (TF a), with a Given (a ~# Char). We must fully rewrite the Wanted so the tpye family can fire; that wasn't happening.
Showing
- compiler/GHC/Tc/Solver/Equality.hs 57 additions, 48 deletionscompiler/GHC/Tc/Solver/Equality.hs
- testsuite/tests/indexed-types/should_compile/T23408.hs 42 additions, 0 deletionstestsuite/tests/indexed-types/should_compile/T23408.hs
- testsuite/tests/indexed-types/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/indexed-types/should_compile/all.T
Loading
Please register or sign in to comment