[commit: ghc] master: Use nameSetAny in findUses (cb2c042)

git at git.haskell.org git at git.haskell.org
Thu Jun 2 09:26:16 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cb2c042947ccc4d13bd11d3e4bce47059c3471de/ghc

>---------------------------------------------------------------

commit cb2c042947ccc4d13bd11d3e4bce47059c3471de
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Thu Jun 2 02:17:37 2016 -0700

    Use nameSetAny in findUses
    
    This kills one use of nameSetElems which is nondeterministic


>---------------------------------------------------------------

cb2c042947ccc4d13bd11d3e4bce47059c3471de
 compiler/basicTypes/NameSet.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/basicTypes/NameSet.hs b/compiler/basicTypes/NameSet.hs
index 1400775..559f439 100644
--- a/compiler/basicTypes/NameSet.hs
+++ b/compiler/basicTypes/NameSet.hs
@@ -195,7 +195,7 @@ findUses dus uses
         = rhs_uses `unionNameSet` uses
     get (Just defs, rhs_uses) uses
         | defs `intersectsNameSet` uses         -- Used
-        || any (startsWithUnderscore . nameOccName) (nameSetElems defs)
+        || nameSetAny (startsWithUnderscore . nameOccName) defs
                 -- At least one starts with an "_",
                 -- so treat the group as used
         = rhs_uses `unionNameSet` uses



More information about the ghc-commits mailing list