[commit: ghc] wip/T12618: Include constructor in freeNamesIfExpr (cc7e754)

git at git.haskell.org git at git.haskell.org
Mon Oct 10 21:42:59 UTC 2016


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

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

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

commit cc7e75428218cc02fe7da916fb2ee5a5e3868807
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Oct 6 23:38:34 2016 -0400

    Include constructor in freeNamesIfExpr


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

cc7e75428218cc02fe7da916fb2ee5a5e3868807
 compiler/iface/IfaceSyn.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 89dbd41..39af25f 100644
--- a/compiler/iface/IfaceSyn.hs
+++ b/compiler/iface/IfaceSyn.hs
@@ -1350,7 +1350,8 @@ freeNamesIfExpr (IfaceCo co)          = freeNamesIfCoercion co
 freeNamesIfExpr (IfaceTuple _ as)     = fnList freeNamesIfExpr as
 freeNamesIfExpr (IfaceLam (b,_) body) = freeNamesIfBndr b &&& freeNamesIfExpr body
 freeNamesIfExpr (IfaceApp f a)        = freeNamesIfExpr f &&& freeNamesIfExpr a
-freeNamesIfExpr (IfaceConApp _ args)  = fnList freeNamesIfExpr args
+freeNamesIfExpr (IfaceConApp dc args) = unitNameSet dc &&&
+                                        fnList freeNamesIfExpr args
 freeNamesIfExpr (IfaceCast e co)      = freeNamesIfExpr e &&& freeNamesIfCoercion co
 freeNamesIfExpr (IfaceTick _ e)       = freeNamesIfExpr e
 freeNamesIfExpr (IfaceECase e ty)     = freeNamesIfExpr e &&& freeNamesIfType ty



More information about the ghc-commits mailing list