[commit: ghc] : coreToStgExpr: add con worker to free variables reported (ab230b9)
git at git.haskell.org
git at git.haskell.org
Mon Oct 10 21:43:15 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch :
Link : http://ghc.haskell.org/trac/ghc/changeset/ab230b9fe7142b1a9dcd62f6af2dce848b0d8f59/ghc
>---------------------------------------------------------------
commit ab230b9fe7142b1a9dcd62f6af2dce848b0d8f59
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Sat Oct 8 16:59:00 2016 -0400
coreToStgExpr: add con worker to free variables reported
>---------------------------------------------------------------
ab230b9fe7142b1a9dcd62f6af2dce848b0d8f59
compiler/stgSyn/CoreToStg.hs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compiler/stgSyn/CoreToStg.hs b/compiler/stgSyn/CoreToStg.hs
index 70d6b8e..1f9cf15 100644
--- a/compiler/stgSyn/CoreToStg.hs
+++ b/compiler/stgSyn/CoreToStg.hs
@@ -340,9 +340,11 @@ coreToStgExpr e@(ConApp dc args)
let app = StgConApp dc args' (dropRuntimeRepArgs (fromMaybe [] (tyConAppArgs_maybe res_ty)))
let tapp = foldr StgTick app ticks'
let vars = getFVSet args_fvs
- app `seq` args_fvs `seq` seqVarSet vars `seq` return (
+ let fun_fvs = singletonFVInfo (dataConWorkId dc) ImportBound noBinderInfo
+ let fvs = fun_fvs `unionFVInfo` args_fvs
+ app `seq` fvs `seq` seqVarSet vars `seq` return (
tapp,
- args_fvs,
+ fvs,
vars
)
More information about the ghc-commits
mailing list