summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToByteCode.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/StgToByteCode.hs')
-rw-r--r--compiler/GHC/StgToByteCode.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs
index 7dad6a87da..37a6539fe6 100644
--- a/compiler/GHC/StgToByteCode.hs
+++ b/compiler/GHC/StgToByteCode.hs
@@ -567,10 +567,8 @@ fvsToEnv :: BCEnv -> CgStgRhs -> [Id]
-- The code that constructs the thunk, and the code that executes
-- it, have to agree about this layout
-fvsToEnv p (StgRhsClosure fvs _ _ _ _) =
- [v | v <- dVarSetElems fvs,
- v `Map.member` p]
-fvsToEnv _ _ = []
+fvsToEnv p rhs = [v | v <- dVarSetElems $ freeVarsOfRhs rhs,
+ v `Map.member` p]
-- -----------------------------------------------------------------------------
-- schemeE