From: simonpj Date: Tue, 16 Dec 2003 16:19:29 +0000 (+0000) Subject: [project @ 2003-12-16 16:19:29 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~191 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=b820793f6103cd9ea1830de6a6ffd6c604de177e [project @ 2003-12-16 16:19:29 by simonpj] Dont report bindings beginning with _ as unused --- diff --git a/ghc/compiler/basicTypes/NameSet.lhs b/ghc/compiler/basicTypes/NameSet.lhs index 4474391..d0e55de 100644 --- 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