diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-03-04 23:19:42 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-03-04 23:19:42 -0500 |
commit | 3a1210f20915702983e4750a280daf8892e51c31 (patch) | |
tree | 06389fa7929716b8cc2a41abafc85f52d9988a0a /compiler/deSugar/Desugar.hs | |
parent | c32dcb8fdaa45dc0f56dc1dda935a7ef15970327 (diff) | |
download | haskell-3a1210f20915702983e4750a280daf8892e51c31.tar.gz |
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) |