diff options
-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 |