Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/a96f61282b0c5981be5c5c2d442b9b16195fb746

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

commit a96f61282b0c5981be5c5c2d442b9b16195fb746
Author: [email protected] <unknown>
Date:   Mon Feb 14 14:03:34 2011 +0000

    Fix Trac #4953: local let binders can have IdInfo with free names
    
    Local let binders in IfaceExpr never used to have unfoldings,
    but lately they can (becuase they can have an INLINE pragma).
    We must take account of the variables mentioned in the pragma
    when computing the fingerprint.

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

 compiler/iface/IfaceSyn.lhs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs
index c06137c..3eae7a3 100644
--- a/compiler/iface/IfaceSyn.lhs
+++ b/compiler/iface/IfaceSyn.lhs
@@ -798,8 +798,10 @@ freeNamesIfBndr (IfaceTvBndr b) = freeNamesIfTvBndr b
 
 freeNamesIfLetBndr :: IfaceLetBndr -> NameSet
 -- Remember IfaceLetBndr is used only for *nested* bindings
--- The cut-down IdInfo never contains any Names, but the type may!
-freeNamesIfLetBndr (IfLetBndr _name ty _info) = freeNamesIfType ty
+-- The IdInfo can contain an unfolding (in the case of 
+-- local INLINE pragmas), so look there too
+freeNamesIfLetBndr (IfLetBndr _name ty info) = freeNamesIfType ty
+                                             &&& freeNamesIfIdInfo info
 
 freeNamesIfTvBndr :: IfaceTvBndr -> NameSet
 freeNamesIfTvBndr (_fs,k) = freeNamesIfType k



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to