diff options
author | Joachim Breitner <breitner@kit.edu> | 2014-01-29 17:29:53 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2014-02-10 10:45:46 +0000 |
commit | 79dfb9688c99f90c67fff15365c1ce2b0f6b8b61 (patch) | |
tree | 7f101ff95080aab5dadf178e108142b2999d6ce6 /libraries/base/Data/List.hs | |
parent | 7822166732d75185195fe479b95beb84763225b1 (diff) | |
download | haskell-79dfb9688c99f90c67fff15365c1ce2b0f6b8b61.tar.gz |
Inline maximum/minium a bit more aggresively
in order to allow fusion of the foldr in the foldl in the foldl' therein.
Diffstat (limited to 'libraries/base/Data/List.hs')
-rw-r--r-- | libraries/base/Data/List.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs index 4796055ddb..09aed9d324 100644 --- a/libraries/base/Data/List.hs +++ b/libraries/base/Data/List.hs @@ -519,7 +519,7 @@ insertBy cmp x ys@(y:ys') -- It is a special case of 'Data.List.maximumBy', which allows the -- programmer to supply their own comparison function. maximum :: (Ord a) => [a] -> a -{-# NOINLINE [1] maximum #-} +{-# INLINE [1] maximum #-} maximum [] = errorEmptyList "maximum" maximum xs = foldl1 max xs @@ -540,7 +540,7 @@ strictMaximum xs = foldl1' max xs -- It is a special case of 'Data.List.minimumBy', which allows the -- programmer to supply their own comparison function. minimum :: (Ord a) => [a] -> a -{-# NOINLINE [1] minimum #-} +{-# INLINE [1] minimum #-} minimum [] = errorEmptyList "minimum" minimum xs = foldl1 min xs |