diff options
| author | Sebastian Graf <sebastian.graf@kit.edu> | 2020-09-21 14:49:56 +0200 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-30 02:48:27 -0400 |
| commit | 3ab0d8f77ec67676de40ebe6ff7e86756e5c761e (patch) | |
| tree | 9b91405f7c7ad48f7ed8ec9a1cf65dbda4e349a9 /compiler/GHC/SysTools | |
| parent | 8e3f00dd24936b6674d0a2322f8410125968583e (diff) | |
| download | haskell-3ab0d8f77ec67676de40ebe6ff7e86756e5c761e.tar.gz | |
PmCheck: Long-distance information for LocalBinds (#18626)
Now `desugarLocalBind` (formerly `desugarLet`) reasons about
* `FunBind`s that
* Have no pattern matches (so which aren't functions)
* Have a singleton match group with a single GRHS
* (which may have guards)
* and looks through trivial post-typechecking `AbsBinds` in doing so
to pick up the introduced renamings.
And desugars to `PmLet` LYG-style guards. Since GRHSs are no longer
denoted simply by `NonEmpty PmGRHS`, but also need to carry a `[PmGrd]`
for the `PmLet`s from `LocalBind`s, I added `PmGRHSs` to capture that.
Since we call out to the desugarer more often, I found that there were
superfluous warnings emitted when desugaring e.g. case expressions.
Thus, I made sure that we deactivate any warnings in the LYG desugaring
steps by the new wrapper function `noCheckDs`.
There's a regression test in `T18626`. Fixes #18626.
Diffstat (limited to 'compiler/GHC/SysTools')
0 files changed, 0 insertions, 0 deletions
