Kind TyCons: require KindSignatures, not DataKinds
Uses of a TyCon in a kind signature required users to enable DataKinds, which didn't make much sense, e.g. in type U = Type type MyMaybe (a :: U) = MyNothing | MyJust a Now the DataKinds error is restricted to data constructors; the use of kind-level type constructors is instead gated behind -XKindSignatures. This patch also adds a convenience pattern synonym for patching on both a TyCon or a TcTyCon stored in a TcTyThing, used in tcTyVar and tc_infer_id. fixes #20873
Showing
- compiler/GHC/Tc/Gen/Head.hs 2 additions, 2 deletionscompiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/HsType.hs 7 additions, 20 deletionscompiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Types.hs 8 additions, 4 deletionscompiler/GHC/Tc/Types.hs
- testsuite/tests/typecheck/should_compile/T20873.hs 23 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T20873.hs
- testsuite/tests/typecheck/should_compile/T20873b.hs 11 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T20873b.hs
- testsuite/tests/typecheck/should_compile/T20873b_aux.hs 7 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T20873b_aux.hs
- testsuite/tests/typecheck/should_compile/all.T 3 additions, 0 deletionstestsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/typecheck/should_fail/T20873c.hs 11 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T20873c.hs
- testsuite/tests/typecheck/should_fail/T20873c.stderr 5 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T20873c.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