summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/Foldable.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs
index ce097df581..0a8b00380d 100644
--- a/libraries/base/Data/Foldable.hs
+++ b/libraries/base/Data/Foldable.hs
@@ -270,6 +270,8 @@ class Foldable t where
-- | @since 2.01
instance Foldable Maybe where
+ foldMap = maybe mempty
+
foldr _ z Nothing = z
foldr f z (Just x) = f x z