diff options
author | alexbiehl <alex.biehl@gmail.com> | 2017-01-23 21:30:35 +0100 |
---|---|---|
committer | alexbiehl <alex.biehl@gmail.com> | 2017-01-23 21:30:35 +0100 |
commit | e29f88b5d952f2f40f68e2bb49f051b6684d2686 (patch) | |
tree | 2299e6d2c075971a6dfcfba636ce42b5412cc2ee | |
parent | fd9608ea93fc2389907b82c3fe540805d986c28e (diff) | |
download | haskell-wip/discount-fv.tar.gz |
Include lambda binder in scopewip/discount-fv
-rw-r--r-- | compiler/coreSyn/CoreUnfold.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs index 36ea382ae3..e72d95ae04 100644 --- a/compiler/coreSyn/CoreUnfold.hs +++ b/compiler/coreSyn/CoreUnfold.hs @@ -523,8 +523,9 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr size_up_app is fun [arg] (if isRealWorldExpr arg then 1 else 0) size_up is (Lam b e) - | isId b && not (isRealWorldId b) = lamScrutDiscount dflags (size_up is e `addSizeN` 10) - | otherwise = size_up is e + | isId b && not (isRealWorldId b) = lamScrutDiscount dflags (size_up is' e `addSizeN` 10) + | otherwise = size_up is' e + where is' = extendInScopeSet is b size_up is (Let (NonRec binder rhs) body) = let |