[Git][ghc/ghc][wip/T18341] 16 commits: PmCheck: Big refactor using guard tree variants more closely following source syntax (#18565)
Sebastian Graf
gitlab at gitlab.haskell.org
Fri Aug 28 13:00:49 UTC 2020
Sebastian Graf pushed to branch wip/T18341 at Glasgow Haskell Compiler / GHC
Commits:
b5a6da4b by Sebastian Graf at 2020-08-28T11:37:15+02:00
PmCheck: Big refactor using guard tree variants more closely following source syntax (#18565)
Previously, we desugared and coverage checked plain guard trees as
described in Lower Your Guards. That caused (in !3849) quite a bit of
pain when we need to partially recover tree structure of the input
syntax to return covered sets for long-distance information, for
example.
In this refactor, I introduced a guard tree variant for each relevant
source syntax component of a pattern-match (mainly match groups, match,
GRHS, empty case, pattern binding). I made sure to share as much
coverage checking code as possible, so that the syntax-specific checking
functions are just wrappers around the more substantial checking
functions for the LYG primitives (`checkSequence`, `checkGrds`).
The refactoring payed off in clearer code and elimination of all panics
related to assumed guard tree structure and thus fixes #18565.
I also took the liberty to rename and re-arrange the order of functions
and comments in the module, deleted some dead and irrelevant Notes,
wrote some new ones and gave an overview module haddock.
- - - - -
1ac60f60 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Fix #18341
- - - - -
fb066ef4 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Make PmConCt lazy and preserve ⊥
- - - - -
8ed86d04 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Fix a few bugs
- - - - -
ddb51796 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Accept tests
- - - - -
33c7c4f9 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Add regression test for #18341
- - - - -
27cb92d0 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Add regression test for #17725
- - - - -
95db9b7e by Sebastian Graf at 2020-08-28T11:41:58+02:00
Add regression test for #17378
- - - - -
1c88a138 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Add regression test for #10183
- - - - -
1f6c6c17 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Add regression test for #17729
- - - - -
9a5e4653 by Sebastian Graf at 2020-08-28T11:41:58+02:00
Add regression test for fixed #18273
- - - - -
e55a62dd by Sebastian Graf at 2020-08-28T11:41:58+02:00
Refactor ensureInhabited and resolve a scoping bug from the previous refactor
- - - - -
40c39c8f by Sebastian Graf at 2020-08-28T11:56:39+02:00
review feedback
- - - - -
67f24014 by Sebastian Graf at 2020-08-28T12:21:50+02:00
Rename Delta to Nabla
- - - - -
44eeaa08 by Sebastian Graf at 2020-08-28T13:28:17+02:00
A bit of cleanup
- - - - -
5390abaa by Sebastian Graf at 2020-08-28T15:00:35+02:00
Accept the change to T17340
- - - - -
10 changed files:
- .gitignore
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Data/OrdList.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/GuardedRHSs.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/PmCheck.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9eb1f47ae367b973948acb4d5e595722b3cc5de6...5390abaafec8bb8328f3db96aa322da505c980fa
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9eb1f47ae367b973948acb4d5e595722b3cc5de6...5390abaafec8bb8328f3db96aa322da505c980fa
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200828/798d196d/attachment.html>
More information about the ghc-commits
mailing list