diff options
Diffstat (limited to 'compiler/deSugar/Desugar.hs')
-rw-r--r-- | compiler/deSugar/Desugar.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs index 5bec60e034..1e1aa9233f 100644 --- a/compiler/deSugar/Desugar.hs +++ b/compiler/deSugar/Desugar.hs @@ -418,14 +418,14 @@ dsRule _ = panic "dsRule: Impossible Match" -- due to #15884 warnRuleShadowing :: RuleName -> Activation -> Id -> [Id] -> DsM () -- See Note [Rules and inlining/other rules] warnRuleShadowing rule_name rule_act fn_id arg_ids - = do { check False fn_id -- We often have multiple rules for the same Id in a - -- module. Maybe we should check that they don't overlap - -- but currently we don't - ; dflags <- getDynFlags + = do { dflags <- getDynFlags + ; check dflags False fn_id -- We often have multiple rules for the same Id in a + -- module. Maybe we should check that they don't overlap + -- but currently we don't ; mapM_ (check dflags True) arg_ids } where check dflags check_rules_too lhs_id - | isLocalId lhs_id || (canUnfold (idOptUnfolding dflags lhs_id) + | isLocalId lhs_id || (canUnfold (idOptUnfolding dflags lhs_id)) -- If imported with no unfolding, no worries , idInlineActivation lhs_id `competesWith` rule_act = warnDs (Reason Opt_WarnInlineRuleShadowing) |