summaryrefslogtreecommitdiff
path: root/compiler/simplCore/Simplify.lhs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2008-09-05 17:18:14 +0000
committersimonpj@microsoft.com <unknown>2008-09-05 17:18:14 +0000
commitcef4b33c4155f4225035fdae17bc410d229c805e (patch)
tree830478342eb4dd67fb993d18e6383562dd2ba4e1 /compiler/simplCore/Simplify.lhs
parent3444b48ef7644c235d7f164f8837090dc30c23bb (diff)
downloadhaskell-cef4b33c4155f4225035fdae17bc410d229c805e.tar.gz
Retain unfoldings even with SimplGently
When binding x = e, we now attach an unfolding to 'x' even if it won't be used because SimplGently is on. Reason: the specialiser runs right after SimplGently, and it (now) only gathers call information for calls whose dictionary arguments are "interesting" -- i.e. have an unfolding of some kind.
Diffstat (limited to 'compiler/simplCore/Simplify.lhs')
-rw-r--r--compiler/simplCore/Simplify.lhs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index 866b2d4fca..e1a8492ee0 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -566,7 +566,10 @@ completeBind env top_lvl old_bndr new_bndr new_rhs
old_info = idInfo old_bndr
occ_info = occInfo old_info
wkr = substWorker env (workerInfo old_info)
- omit_unfolding = isNonRuleLoopBreaker occ_info || not (activeInline env old_bndr)
+ omit_unfolding = isNonRuleLoopBreaker occ_info
+ -- or not (activeInline env old_bndr)
+ -- Do *not* trim the unfolding in SimplGently, else
+ -- the specialiser can't see it!
-----------------
addPolyBind :: TopLevelFlag -> SimplEnv -> OutBind -> SimplEnv