Pmc: Fix SrcLoc and warning for incomplete irrefutable pats (#24234)
Before, the source location would point at the surrounding function definition, causing the confusion in #24234. I also took the opportunity to introduce a new `LazyPatCtx :: HsMatchContext _` to make the warning message say "irrefutable pattern" instead of "pattern binding".
Showing
- compiler/GHC/Hs/Expr.hs 19 additions, 14 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Binds.hs 1 addition, 1 deletioncompiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Match.hs 3 additions, 3 deletionscompiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc.hs 1 addition, 0 deletionscompiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs 1 addition, 0 deletionscompiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Utils.hs 14 additions, 8 deletionscompiler/GHC/HsToCore/Utils.hs
- compiler/Language/Haskell/Syntax/Expr.hs 1 addition, 0 deletionscompiler/Language/Haskell/Syntax/Expr.hs
- testsuite/tests/ado/T22483.stderr 2 additions, 2 deletionstestsuite/tests/ado/T22483.stderr
- testsuite/tests/deSugar/should_run/dsrun008.stderr 1 addition, 1 deletiontestsuite/tests/deSugar/should_run/dsrun008.stderr
- testsuite/tests/pmcheck/should_compile/T24234.hs 7 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T24234.hs
- testsuite/tests/pmcheck/should_compile/T24234.stderr 8 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T24234.stderr
- testsuite/tests/pmcheck/should_compile/all.T 2 additions, 1 deletiontestsuite/tests/pmcheck/should_compile/all.T
Loading
Please register or sign in to comment