Fix error recovery for pattern synonyms
As Trac #15289 showed, we were carrying on after a type error in a pattern synonym, and then crashing. This patch improves error handling for pattern synonyms. I also moved a bit of code from TcBinds into TcPatSyn, which helpfully narrows the API. (cherry picked from commit 2896082e)
Showing
- compiler/typecheck/TcBinds.hs 2 additions, 9 deletionscompiler/typecheck/TcBinds.hs
- compiler/typecheck/TcPatSyn.hs 74 additions, 12 deletionscompiler/typecheck/TcPatSyn.hs
- compiler/typecheck/TcPatSyn.hs-boot 5 additions, 7 deletionscompiler/typecheck/TcPatSyn.hs-boot
- testsuite/tests/patsyn/should_fail/T15289.stderr 13 additions, 8 deletionstestsuite/tests/patsyn/should_fail/T15289.stderr
- testsuite/tests/patsyn/should_fail/all.T 1 addition, 1 deletiontestsuite/tests/patsyn/should_fail/all.T
Loading
Please register or sign in to comment