PmCheck: Better long-distance info for where bindings (#18533)
Where bindings can see evidence from the pattern match of the GRHSs
they belong to, but not from anything in any of the guards (which belong
to one of possibly many RHSs).
Before this patch, we did not consider said evidence, causing #18533 (closed), where the lack of considering type information from a case pattern match leads to failure to resolve the vanilla COMPLETE set of a data type.
Making available that information required a medium amount of
refactoring so that checkMatches
can return a
[(Deltas, NonEmpty Deltas)]
; one (Deltas, NonEmpty Deltas)
for each
GRHSs
of the match group. The first component of the pair is the
covered set of the pattern, the second component is one covered set per
RHS.
Fixes #18533 (closed). Regression test case: T18533