[commit: ghc] master: base: Improve haddocks for Functor (118fca7)

git at git.haskell.org git at git.haskell.org
Fri Nov 2 21:13:26 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/118fca7fe413c3cf986cd07b8694917fde190a3b/ghc

>---------------------------------------------------------------

commit 118fca7fe413c3cf986cd07b8694917fde190a3b
Author: Simon Jakobi <simon.jakobi at gmail.com>
Date:   Wed Oct 24 12:40:36 2018 +0200

    base: Improve haddocks for Functor


>---------------------------------------------------------------

118fca7fe413c3cf986cd07b8694917fde190a3b
 libraries/base/GHC/Base.hs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index d1f87e1..92c8a28 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -448,8 +448,11 @@ instance Monoid a => Monoid (IO a) where
 lets you apply any function from @(a -> b)@ to turn an @f a@ into an @f b@, preserving the
 structure of @f at . Furthermore @f@ needs to adhere to the following laws:
 
-> fmap id == id
-> fmap (f . g) == fmap f . fmap g
+[/identity/]
+  @'fmap' 'id' = 'id'@
+
+[/composition/]
+  @'fmap' (f . g) = 'fmap' f . 'fmap' g@
 -}
 
 class  Functor f  where



More information about the ghc-commits mailing list