[PATCH 2/3] Inline nand, nor, nany and nall

Alexander Berntsen alexander at plaimi.net
Thu Feb 27 15:13:01 UTC 2014


---
 GHC/List.lhs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/GHC/List.lhs b/GHC/List.lhs
index a8b8950..7fb751a 100644
--- a/GHC/List.lhs
+++ b/GHC/List.lhs
@@ -530,6 +530,7 @@ or (x:xs)       =  x || or xs
 --
 -- /Since: 4.7.0.0/
 nand :: [Bool] -> Bool
+{-# INLINE nand #-}
 nand = not . and
 
 -- | 'nor' returns the negated disjunction of a Boolean list.  For the result
@@ -538,6 +539,7 @@ nand = not . and
 --
 -- /Since: 4.7.0.0/
 nor :: [Bool] -> Bool
+{-# INLINE nor #-}
 nor = not . or
 
 -- | Applied to a predicate and a list, 'any' determines if any element
@@ -577,6 +579,7 @@ all p (x:xs)    =  p x && all p xs
 -- 'True', the list must be finite; 'False', however, results from a 'True'
 -- value for the predicate applied to an element at a finite index of a finite or infinite list.
 nany :: (a -> Bool) -> [a] -> Bool
+{-# INLINE nany #-}
 nany p = not . any p
 
 -- | Applied to a predicate and a list, 'nall' determines if not all elements
@@ -584,6 +587,7 @@ nany p = not . any p
 -- 'False', the list must be finite; 'True', however, results from a 'False'
 -- value for the predicate applied to an element at a finite index of a finite or infinite list.
 nall :: (a -> Bool) -> [a] -> Bool
+{-# INLINE nall #-}
 nall p = not . all p
 
 -- | 'elem' is the list membership predicate, usually written in infix form,
-- 
1.8.3.2



More information about the Libraries mailing list