[commit: ghc] master: Manual hlinting: or (map f) = any f (e2cacb6)

git at git.haskell.org git at git.haskell.org
Thu Feb 13 10:30:29 UTC 2014


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

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

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

commit e2cacb66e10c7b991e77d7a3c0d9f5dc7c4c2cf8
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Feb 13 10:30:21 2014 +0000

    Manual hlinting: or (map f) = any f


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

e2cacb66e10c7b991e77d7a3c0d9f5dc7c4c2cf8
 compiler/deSugar/Check.lhs      |    4 ++--
 compiler/nativeGen/X86/Instr.hs |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs
index 960475ce..91c2e8b 100644
--- a/compiler/deSugar/Check.lhs
+++ b/compiler/deSugar/Check.lhs
@@ -421,8 +421,8 @@ compare_cons _ _ = panic "Check.compare_cons: Not ConPatOut with RealDataCon"
 
 remove_dups :: [Pat Id] -> [Pat Id]
 remove_dups []     = []
-remove_dups (x:xs) | or (map (\y -> compare_cons x y) xs) = remove_dups  xs
-                   | otherwise                            = x : remove_dups xs
+remove_dups (x:xs) | any (\y -> compare_cons x y) = remove_dups  xs
+                   | otherwise                    = x : remove_dups xs
 
 get_used_cons :: [(EqnNo, EquationInfo)] -> [Pat Id]
 get_used_cons qs = remove_dups [pat | q <- qs, let pat = firstPatN q,
diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs
index d10591e..8284270 100644
--- a/compiler/nativeGen/X86/Instr.hs
+++ b/compiler/nativeGen/X86/Instr.hs
@@ -788,7 +788,7 @@ i386_insert_ffrees
         -> [GenBasicBlock Instr]
 
 i386_insert_ffrees blocks
-   | or (map (any is_G_instr) [ instrs | BasicBlock _ instrs <- blocks ])
+   | any (any is_G_instr) [ instrs | BasicBlock _ instrs <- blocks ]
    = map insertGFREEs blocks
    | otherwise
    = blocks



More information about the ghc-commits mailing list