summaryrefslogtreecommitdiff
path: root/compiler/simplCore/Simplify.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-05-23 13:30:21 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-05-23 14:44:40 +0100
commitd191db48c43469ee1818887715bcbc5c0eb1d91f (patch)
treeafa2dabbb6d0ef58512a65ed8979c9a8c61715ea /compiler/simplCore/Simplify.hs
parent86bba7d519fb6050f78b7e3bac2b3f54273fd70e (diff)
downloadhaskell-d191db48c43469ee1818887715bcbc5c0eb1d91f.tar.gz
Don't expose strictness when sm_inline is False
This is very much a corner case, but Trac #15163 showed that if you have a RULE like forall x. f (g x) = ..x.. and g = undefined, then the simplifier is likely to discard that 'x' argument. It is usually right to do so; but not here because then x is used on the right but not bound on the left. The fix is a narrow one, aimed at this rather pathalogical case. See Note [Do not expose strictness if sm_inline=False] in SimplUtils.
Diffstat (limited to 'compiler/simplCore/Simplify.hs')
-rw-r--r--compiler/simplCore/Simplify.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index b50771a9ae..5e514c5ecf 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -1734,7 +1734,7 @@ completeCall env var cont
| otherwise
-- Don't inline; instead rebuild the call
= do { rule_base <- getSimplRules
- ; let info = mkArgInfo var (getRules rule_base var)
+ ; let info = mkArgInfo env var (getRules rule_base var)
n_val_args call_cont
; rebuildCall env info cont }