Commit b34291ea authored by simonpj's avatar simonpj
Browse files

[project @ 2002-02-27 15:53:46 by simonpj]

parent 205d1bb0
......@@ -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
-- A rule is an orphan if the LHS mentions nothing defined locally
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)
no_locals names = isEmptyNameSet (filterNameSet (nameIsLocalOrFrom this_mod) names)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment