Skip to content

PmCheck: Long-distance information for LocalBinds (#18626)

Sebastian Graf requested to merge wip/T18626 into master

Now desugarLocalBind (formerly desugarLet) reasons about

  • The abs_binds of an AbsBinds post type-checking, or
  • FunBinds that
    • Have no pattern matches (so which aren't functions)
    • Have a singleton match group with a single GRHS
    • (which may have guards)

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 PmLets from LocalBinds, I added PmGRHSs to capture that.

There's a regression test in T18626. Fixes #18626 (closed).

Edited by Sebastian Graf

Merge request reports