Check for uninferrable variables in tcInferPatSynDecl
This fixes #21479 See Note [Unquantified tyvars in a pattern synonym] While doing this, I found that some error messages pointed at the pattern synonym /name/, rather than the /declaration/ so I widened the SrcSpan to encompass the declaration.
Showing
- compiler/GHC/Tc/Gen/Bind.hs 2 additions, 2 deletionscompiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs 41 additions, 16 deletionscompiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs-boot 5 additions, 5 deletionscompiler/GHC/Tc/TyCl/PatSyn.hs-boot
- compiler/GHC/Tc/Utils/TcMType.hs 16 additions, 15 deletionscompiler/GHC/Tc/Utils/TcMType.hs
- testsuite/tests/linear/should_fail/LinearPatSyn2.stderr 1 addition, 1 deletiontestsuite/tests/linear/should_fail/LinearPatSyn2.stderr
- testsuite/tests/patsyn/should_fail/T11667.stderr 1 addition, 1 deletiontestsuite/tests/patsyn/should_fail/T11667.stderr
- testsuite/tests/patsyn/should_fail/T14507.stderr 1 addition, 1 deletiontestsuite/tests/patsyn/should_fail/T14507.stderr
- testsuite/tests/patsyn/should_fail/T14552.stderr 1 addition, 1 deletiontestsuite/tests/patsyn/should_fail/T14552.stderr
- testsuite/tests/patsyn/should_fail/T15685.stderr 1 addition, 1 deletiontestsuite/tests/patsyn/should_fail/T15685.stderr
- testsuite/tests/patsyn/should_fail/T21479.hs 13 additions, 0 deletionstestsuite/tests/patsyn/should_fail/T21479.hs
- testsuite/tests/patsyn/should_fail/T21479.stderr 5 additions, 0 deletionstestsuite/tests/patsyn/should_fail/T21479.stderr
- testsuite/tests/patsyn/should_fail/all.T 1 addition, 0 deletionstestsuite/tests/patsyn/should_fail/all.T
Loading
Please register or sign in to comment