-
Ben Gamari authored
When rewriting in a rule, GHC pretends that it is in the phase given by the activation phase of the rule (see Note [Simplifying inside stable unfoldings] in `SimplUtils` for rationale). This means that while rewriting the text literal rules, the simplifier is effectively in phase 2 due to 86ddf8a9. As it turns out, the `build` rule provided by `base` is also active in phase 2, meaning it still competes with the literal rules (as 7.10.2 uses it to rewrite the LHS). For this reason, the previous change did not resolve the performance issue in 7.10.2; something I did not previously catch due to a rather silly issue in my test envirionment. This issue is now properly resolved by activating the literal rewrite rules only in phase 1, by which point the `build` rule is inactive. See comments 22 through 25 in GHC Trac #10528 for details.
9b01539f