diff options
author | Takano Akio <aljee@hyper.cx> | 2015-08-05 14:23:22 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-08-05 14:45:16 +0200 |
commit | 22bbc1cf209d44b8bb8897ae7a35f9ebaf411b10 (patch) | |
tree | 9604a8e2456b1c148ac99859efd365a30f2dda00 /libraries/base/Data | |
parent | b12dba7829742de98a483645142c7962b9dd9f3f (diff) | |
download | haskell-22bbc1cf209d44b8bb8897ae7a35f9ebaf411b10.tar.gz |
Make sure that `all`, `any`, `and`, and `or` fuse (#9848)
Test Plan: validate
Reviewers: hvr, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1126
GHC Trac Issues: #9848
Diffstat (limited to 'libraries/base/Data')
-rw-r--r-- | libraries/base/Data/Foldable.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs index 1f20261943..24b6dd18c2 100644 --- a/libraries/base/Data/Foldable.hs +++ b/libraries/base/Data/Foldable.hs @@ -119,6 +119,8 @@ class Foldable t where -- | Map each element of the structure to a monoid, -- and combine the results. foldMap :: Monoid m => (a -> m) -> t a -> m + {-# INLINE foldMap #-} + -- This INLINE allows more list functions to fuse. See Trac #9848. foldMap f = foldr (mappend . f) mempty -- | Right-associative fold of a structure. |