Reject type family equation with wrong name (#20260)
We should reject "type family Foo where Bar = ()". This check was done in kcTyFamInstEqn but not in tcTyFamInstEqn. I factored out arity checking, which was duplicated.
Showing
- compiler/GHC/Tc/TyCl.hs 24 additions, 25 deletionscompiler/GHC/Tc/TyCl.hs
- testsuite/tests/typecheck/should_fail/T20260.hs 8 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T20260.hs
- testsuite/tests/typecheck/should_fail/T20260.stderr 6 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T20260.stderr
- testsuite/tests/typecheck/should_fail/all.T 1 addition, 0 deletionstestsuite/tests/typecheck/should_fail/all.T
Loading
Please register or sign in to comment