summaryrefslogtreecommitdiff
path: root/compiler/simplCore/SimplUtils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/simplCore/SimplUtils.hs')
-rw-r--r--compiler/simplCore/SimplUtils.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index d297be3893..db7485551c 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -702,20 +702,24 @@ updModeForStableUnfoldings inline_rule_act current_mode
phaseFromActivation _ = InitialPhase
updModeForRuleLHS :: SimplifierMode -> SimplifierMode
--- See Note [Simplifying RULE LHSs]
+-- See Note [Simplifying rule LHSs]
updModeForRuleLHS current_mode
= current_mode { sm_phase = InitialPhase
, sm_inline = False
, sm_rules = False
, sm_eta_expand = False }
-{- Note [Simplifying RULE LHSs]
+{- Note [Simplifying rule LHSs]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When simplifying on the LHS of a rule, refrain from all inlining and
all RULES. Doing anything to the LHS is plain confusing, because it
means that what the rule matches is not what the user wrote.
c.f. Trac #10595, and #10528.
+Moreover, inlining (or applying rules) on rule LHSs risks introducing
+Ticks into the LHS, which makes matching trickier. Trac #10665, #10745.
+
+
Note [Inlining in gentle mode]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Something is inlined if