[commit: ghc] wip/T12618: ConApp: Include dc worker id in free variables (5a7d036)

git at git.haskell.org git at git.haskell.org
Thu Oct 6 23:20:04 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T12618
Link       : http://ghc.haskell.org/trac/ghc/changeset/5a7d036452d83c7d456a73b4fc4781aa76c57f62/ghc

>---------------------------------------------------------------

commit 5a7d036452d83c7d456a73b4fc4781aa76c57f62
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Oct 4 13:33:05 2016 -0400

    ConApp: Include dc worker id in free variables
    
    just to see if this fixes the crashes here.


>---------------------------------------------------------------

5a7d036452d83c7d456a73b4fc4781aa76c57f62
 compiler/coreSyn/CoreFVs.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs
index 0856f76..f4fb3af 100644
--- a/compiler/coreSyn/CoreFVs.hs
+++ b/compiler/coreSyn/CoreFVs.hs
@@ -73,7 +73,7 @@ import Var
 import Type
 import TyCoRep
 import TyCon
-import DataCon ( dataConRepType )
+import DataCon ( dataConRepType, dataConWorkId )
 import CoAxiom
 import FamInstEnv
 import TysPrim( funTyConName )
@@ -260,8 +260,8 @@ expr_fvs (Tick t expr) fv_cand in_scope acc =
   (tickish_fvs t `unionFV` expr_fvs expr) fv_cand in_scope acc
 expr_fvs (App fun arg) fv_cand in_scope acc =
   (expr_fvs fun `unionFV` expr_fvs arg) fv_cand in_scope acc
-expr_fvs (ConApp _ args) fv_cand in_scope acc =
-  (mapUnionFV expr_fvs args) fv_cand in_scope acc
+expr_fvs (ConApp dc args) fv_cand in_scope acc =
+  (FV.unitFV (dataConWorkId dc) `unionFV` mapUnionFV expr_fvs args) fv_cand in_scope acc
 expr_fvs (Lam bndr body) fv_cand in_scope acc =
   addBndr bndr (expr_fvs body) fv_cand in_scope acc
 expr_fvs (Cast expr co) fv_cand in_scope acc =



More information about the ghc-commits mailing list