Skip to content
  • Sebastian Graf's avatar
    PmCheck: Only ever check constantly many models against a single pattern · ebc65025
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    Introduces a new flag `-fmax-pmcheck-deltas` to achieve that. Deprecates
    the old `-fmax-pmcheck-iter` mechanism in favor of this new flag.
    
    From the user's guide:
    
    Pattern match checking can be exponential in some cases. This limit makes sure
    we scale polynomially in the number of patterns, by forgetting refined
    information gained from a partially successful match. For example, when
    matching `x` against `Just 4`, we split each incoming matching model into two
    sub-models: One where `x` is not `Nothing` and one where `x` is `Just y` but
    `y` is not `4`. When the number of incoming models exceeds the limit, we
    continue checking the next clause with the original, unrefined model.
    
    This also retires the incredibly hard to understand "maximum number of
    refinements" mechanism, because the current mechanism is more general
    and should catch the same exponential cases like PrelRules at the same
    time.
    
    -------------------------
    Metric Decrease:
        T11822
    -------------------------
    ebc65025