projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
172dd51
)
[project @ 2003-12-16 16:19:29 by simonpj]
author
simonpj
<unknown>
Tue, 16 Dec 2003 16:19:29 +0000
(16:19 +0000)
committer
simonpj
<unknown>
Tue, 16 Dec 2003 16:19:29 +0000
(16:19 +0000)
Dont report bindings beginning with _ as unused
ghc/compiler/basicTypes/NameSet.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/basicTypes/NameSet.lhs
b/ghc/compiler/basicTypes/NameSet.lhs
index
4474391
..
d0e55de
100644
(file)
--- a/
ghc/compiler/basicTypes/NameSet.lhs
+++ b/
ghc/compiler/basicTypes/NameSet.lhs
@@
-180,7
+180,10
@@
findUses dus uses
get (Nothing, rhs_uses) uses
= rhs_uses `unionNameSets` uses
get (Just defs, rhs_uses) uses
- | defs `intersectsNameSet` uses
+ | defs `intersectsNameSet` uses -- Used
+ || not (all (reportIfUnused . nameOccName) (nameSetToList defs))
+ -- At least one starts with an "_",
+ -- so treat the group as used
= rhs_uses `unionNameSets` uses
| otherwise -- No def is used
= uses