diff options
author | Simon Jakobi <simon.jakobi@gmail.com> | 2018-10-24 12:40:36 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-11-02 17:12:54 -0400 |
commit | 118fca7fe413c3cf986cd07b8694917fde190a3b (patch) | |
tree | f90877d73ac05ebb2018161f8ab277efcc7a3b12 /libraries/base | |
parent | c088137949bd69ee463c08a0d221517bc5108945 (diff) | |
download | haskell-118fca7fe413c3cf986cd07b8694917fde190a3b.tar.gz |
base: Improve haddocks for Functor
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Base.hs | 7 |
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 |