diff options
| author | simonpj@microsoft.com <unknown> | 2011-02-14 14:03:34 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2011-02-14 14:03:34 +0000 |
| commit | a96f61282b0c5981be5c5c2d442b9b16195fb746 (patch) | |
| tree | 7c92e9c5e7695fb2c3bc948b8b7246ea55e4b93c | |
| parent | 972bf5f61cebb29ffd6c86453f3571c2bc138392 (diff) | |
| download | haskell-a96f61282b0c5981be5c5c2d442b9b16195fb746.tar.gz | |
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.
| -rw-r--r-- | 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 c06137cabf..3eae7a3d41 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 |
