Don't attempt pattern synonym error recovery
This commit gets rid of the pattern synonym error recovery mechanism (recoverPSB). The rationale is that the fake pattern synonym binding that the recovery mechanism introduced could lead to undesirable knock-on errors, and it isn't really feasible to conjure up a satisfactory binding as pattern synonyms can be used both in expressions and patterns. See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn. It isn't such a big deal to eagerly fail compilation on a pattern synonym that doesn't typecheck anyway. Fixes #23467
Showing
- compiler/GHC/Tc/TyCl/PatSyn.hs 14 additions, 34 deletionscompiler/GHC/Tc/TyCl/PatSyn.hs
- testsuite/tests/patsyn/should_fail/T23467.hs 12 additions, 0 deletionstestsuite/tests/patsyn/should_fail/T23467.hs
- testsuite/tests/patsyn/should_fail/T23467.stderr 5 additions, 0 deletionstestsuite/tests/patsyn/should_fail/T23467.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