summaryrefslogtreecommitdiff
path: root/compiler/simplCore/SimplEnv.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/simplCore/SimplEnv.hs')
-rw-r--r--compiler/simplCore/SimplEnv.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/simplCore/SimplEnv.hs b/compiler/simplCore/SimplEnv.hs
index f35d120af9..c244ae40c6 100644
--- a/compiler/simplCore/SimplEnv.hs
+++ b/compiler/simplCore/SimplEnv.hs
@@ -15,7 +15,8 @@ module SimplEnv (
mkSimplEnv, extendIdSubst,
SimplEnv.extendTvSubst, SimplEnv.extendCvSubst,
zapSubstEnv, setSubstEnv,
- getInScope, setInScope, setInScopeSet, modifyInScope, addNewInScopeIds,
+ getInScope, setInScopeAndZapFloats,
+ setInScopeSet, modifyInScope, addNewInScopeIds,
getSimplRules,
-- * Substitution results
@@ -290,18 +291,18 @@ getInScope env = seInScope env
setInScopeSet :: SimplEnv -> InScopeSet -> SimplEnv
setInScopeSet env in_scope = env {seInScope = in_scope}
-setInScope :: SimplEnv -> SimplEnv -> SimplEnv
+setInScopeAndZapFloats :: SimplEnv -> SimplEnv -> SimplEnv
-- Set the in-scope set, and *zap* the floats
-setInScope env env_with_scope
- = env { seInScope = seInScope env_with_scope,
- seFloats = emptyFloats,
+setInScopeAndZapFloats env env_with_scope
+ = env { seInScope = seInScope env_with_scope,
+ seFloats = emptyFloats,
seJoinFloats = emptyJoinFloats }
setFloats :: SimplEnv -> SimplEnv -> SimplEnv
-- Set the in-scope set *and* the floats
setFloats env env_with_floats
- = env { seInScope = seInScope env_with_floats,
- seFloats = seFloats env_with_floats,
+ = env { seInScope = seInScope env_with_floats,
+ seFloats = seFloats env_with_floats,
seJoinFloats = seJoinFloats env_with_floats }
restoreJoinFloats :: SimplEnv -> SimplEnv -> SimplEnv