summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Baldé <alexandrer_b@outlook.com>2019-04-05 00:48:06 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-09 11:48:34 -0400
commit0462b0e02d8759983484eb09d0ba1be134ec592e (patch)
treec5ab0da06b8b4141a94c56b7c9fffefd7d90ed98
parent8754002973dcde8709458044e541ddc8f4fcf6bb (diff)
downloadhaskell-0462b0e02d8759983484eb09d0ba1be134ec592e.tar.gz
Explain that 'mappend' and '(<>)' should be the same [skip ci]
-rw-r--r--libraries/base/GHC/Base.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index b342386edc..6fd2ff735b 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -271,6 +271,9 @@ class Semigroup a => Monoid a where
--
-- __NOTE__: This method is redundant and has the default
-- implementation @'mappend' = ('<>')@ since /base-4.11.0.0/.
+ -- Should it be implemented manually, since 'mappend' is a synonym for
+ -- ('<>'), it is expected that the two functions are defined the same
+ -- way. In a future GHC release 'mappend' will be removed from 'Monoid'.
mappend :: a -> a -> a
mappend = (<>)
{-# INLINE mappend #-}