Note [User-defined RULES for seq]
Given
case (scrut |> co) of _ -> rhs
look for rules that match the expression
seq @t1 @t2 scrut
where scrut :: t1
rhs :: t2
If you find a match, rewrite it, and apply to 'rhs'.
Notice that we can simply drop casts on the fly here, which
makes it more likely that a rule will match.
See Note [User-defined RULES for seq] in GHC.Types.Id.Make. References 1
- User-defined RULES for seq GHC.Types.Id.Make
Referenced by 1
- GHC.Core.Opt.Simplify.Iteration call site