DynFlags: avoid the use of sdocWithDynFlags in GHC.Core.Rules (#17957)
Straightforward refactoring: we avoid using sdocWithDynFlags
in GHC.Core.Rules
by storing rule options (RuleOpts
) into the RuleCheck
environment. initRuleOpts
factorizes RuleOpts
initialization from DynFlags
which was done implicitly in matchRule
so that we can reuse it.