
With regard to this patch (disregarding all the other things that people
have weighed in on).... Does it actually do anything? These are all very
short functions; I'd rather expect that GHC (and other compilers) would
decide to inline them itself.
Hope you're not getting too discouraged. :)
-- Dan
On Thu, Feb 27, 2014 at 10:13 AM, Alexander Berntsen
--- 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
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries