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:
205d1bb
)
[project @ 2002-02-27 15:53:46 by simonpj]
author
simonpj
<unknown>
Wed, 27 Feb 2002 15:53:46 +0000
(15:53 +0000)
committer
simonpj
<unknown>
Wed, 27 Feb 2002 15:53:46 +0000
(15:53 +0000)
comments
ghc/compiler/main/MkIface.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/main/MkIface.lhs
b/ghc/compiler/main/MkIface.lhs
index
7055df9
..
bce2bb3
100644
(file)
--- a/
ghc/compiler/main/MkIface.lhs
+++ b/
ghc/compiler/main/MkIface.lhs
@@
-139,8
+139,11
@@
isOrphanModule :: Module -> ModDetails -> Bool
isOrphanModule this_mod (ModDetails {md_insts = insts, md_rules = rules})
= any orphan_inst insts || any orphan_rule rules
where
isOrphanModule this_mod (ModDetails {md_insts = insts, md_rules = rules})
= any orphan_inst insts || any orphan_rule rules
where
+ -- A rule is an orphan if the LHS mentions nothing defined locally
orphan_inst dfun_id = no_locals (namesOfDFunHead (idType dfun_id))
orphan_inst dfun_id = no_locals (namesOfDFunHead (idType dfun_id))
+ -- A instance is an orphan if its head mentions nothing defined locally
orphan_rule rule = no_locals (ruleLhsFreeNames rule)
orphan_rule rule = no_locals (ruleLhsFreeNames rule)
+
no_locals names = isEmptyNameSet (filterNameSet (nameIsLocalOrFrom this_mod) names)
\end{code}
no_locals names = isEmptyNameSet (filterNameSet (nameIsLocalOrFrom this_mod) names)
\end{code}