Skip to content
  • Sebastian Graf's avatar
    PmCheck: Better long-distance info for where bindings (#18533) · 55dec4dc
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    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,
    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.
    Regression test case: T18533
    55dec4dc