[Git][ghc/ghc][master] Explain that 'mappend' and '(<>)' should be the same [skip ci]

Marge Bot gitlab at gitlab.haskell.org
Sun Jun 9 15:48:36 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
0462b0e0 by Alexandre Baldé at 2019-06-09T15:48:34Z
Explain that 'mappend' and '(<>)' should be the same [skip ci]

- - - - -


1 changed file:

- libraries/base/GHC/Base.hs


Changes:

=====================================
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 #-}



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/0462b0e02d8759983484eb09d0ba1be134ec592e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/0462b0e02d8759983484eb09d0ba1be134ec592e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190609/6ebbe929/attachment.html>


More information about the ghc-commits mailing list