Skip to content
  • Ben Gamari's avatar
    Show: Activate literal rewrite rules in simplifier phase 2 · 86ddf8a9
    Ben Gamari authored
    Previously these RULES were quite fragile as they could compete with the
    `unpack` rule defined in `GHC.Base`. This was tickled by 7.10.2, which
    happened to rewrite the LHS of rules with other rules (which is itself
    a bug in GHC). This caused the literal rules to fail to fire, which then
    resulted in long compilation times.
    
    To avoid this sort of fragility, we would like the literal rules to fire
    very early in the simplifier. For this reason we set them to rule in
    phase 2.
    
    See GHC Trac #10528 for further discussion [1].
    
    [1] https://ghc.haskell.org/trac/ghc/ticket/10528
    86ddf8a9