diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-08-06 13:40:07 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-08-06 13:40:07 +0100 |
commit | 75f5f23b810f74376c71bdf0db51f3ffca6de015 (patch) | |
tree | 5465b5f5501ca5c9057867a4cb7f633b010db04b | |
parent | 28096b274a3803b8a479c5dd94ebda655a15566c (diff) | |
download | haskell-75f5f23b810f74376c71bdf0db51f3ffca6de015.tar.gz |
Coments only
-rw-r--r-- | compiler/simplCore/SimplUtils.hs | 8 |
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 |