From a96f61282b0c5981be5c5c2d442b9b16195fb746 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Mon, 14 Feb 2011 14:03:34 +0000 Subject: [PATCH] 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 file 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 -- 1.7.10.4