summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorPaavo <pparkkin@gmail.com>2020-03-14 21:09:55 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-17 07:38:48 -0400
commit4d85d68b004a3d577c0e27d9e6fdddd118e8a9f3 (patch)
tree06c5c464b34aa47ae6c3231b8c0eae0aa3536a9f /libraries
parent5b632dad2e1d373606fe29f7eee0daf15641560f (diff)
downloadhaskell-4d85d68b004a3d577c0e27d9e6fdddd118e8a9f3.tar.gz
Clean up
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/Semigroup.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/libraries/base/Data/Semigroup.hs b/libraries/base/Data/Semigroup.hs
index 9a21b9a2ec..d4de06fe0c 100644
--- a/libraries/base/Data/Semigroup.hs
+++ b/libraries/base/Data/Semigroup.hs
@@ -126,7 +126,6 @@ cycle1 xs = xs' where xs' = xs <> xs'
-- | This lets you use a difference list of a 'Semigroup' as a 'Monoid'.
--
--- >>> import Data.Semigroup
-- >>> let hello = diff "Hello, "
-- >>> appEndo hello "World!"
-- "Hello, World!"
@@ -136,9 +135,9 @@ cycle1 xs = xs' where xs' = xs <> xs'
-- "Hello, World!"
-- >>> let world = diff "World"
-- >>> let excl = diff "!"
--- >>> print $ appEndo (hello <> (world <> excl)) mempty
+-- >>> appEndo (hello <> (world <> excl)) mempty
-- "Hello, World!"
--- >>> print $ appEndo ((hello <> world) <> excl) mempty
+-- >>> appEndo ((hello <> world) <> excl) mempty
-- "Hello, World!"
diff :: Semigroup m => m -> Endo m
diff = Endo . (<>)