summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2018-10-24 12:40:36 +0200
committerBen Gamari <ben@smart-cactus.org>2018-11-02 17:12:54 -0400
commit118fca7fe413c3cf986cd07b8694917fde190a3b (patch)
treef90877d73ac05ebb2018161f8ab277efcc7a3b12
parentc088137949bd69ee463c08a0d221517bc5108945 (diff)
downloadhaskell-118fca7fe413c3cf986cd07b8694917fde190a3b.tar.gz
base: Improve haddocks for Functor
-rw-r--r--libraries/base/GHC/Base.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index d1f87e1d62..92c8a28465 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@. 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