projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fee305e
)
Fix #3412: the worker of an Id might not be a local Id
author
Simon Marlow
<marlowsd@gmail.com>
Mon, 3 Aug 2009 11:28:03 +0000
(11:28 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Mon, 3 Aug 2009 11:28:03 +0000
(11:28 +0000)
compiler/main/TidyPgm.lhs
patch
|
blob
|
history
diff --git
a/compiler/main/TidyPgm.lhs
b/compiler/main/TidyPgm.lhs
index
b0fb7d3
..
d198a3f
100644
(file)
--- a/
compiler/main/TidyPgm.lhs
+++ b/
compiler/main/TidyPgm.lhs
@@
-613,7
+613,7
@@
chooseExternalIds hsc_env mod omit_prags binds
| otherwise = do
(occ_env', name') <- tidyTopName mod nc_var (Just referrer) occ_env id
let
| otherwise = do
(occ_env', name') <- tidyTopName mod nc_var (Just referrer) occ_env id
let
- rhs = expectJust "chooseExternalIds" $ lookupVarEnv bind_env id
+ rhs = expectJust (showSDoc (text "chooseExternalIds: " <> ppr id)) $ lookupVarEnv bind_env id
(new_ids, show_unfold)
| omit_prags = ([], False)
| otherwise = addExternal id rhs
(new_ids, show_unfold)
| omit_prags = ([], False)
| otherwise = addExternal id rhs
@@
-635,7
+635,8
@@
addExternal :: Id -> CoreExpr -> ([Id],Bool)
addExternal id rhs = (new_needed_ids, show_unfold)
where
new_needed_ids = unfold_ids ++
addExternal id rhs = (new_needed_ids, show_unfold)
where
new_needed_ids = unfold_ids ++
- filter (not . (`elemVarSet` unfold_set))
+ filter (\id -> isLocalId id &&
+ not (id `elemVarSet` unfold_set))
(varSetElems worker_ids ++
varSetElems spec_ids) -- XXX non-det ordering
(varSetElems worker_ids ++
varSetElems spec_ids) -- XXX non-det ordering