diff options
author | Hécate <hecate+gitlab@glitchbra.in> | 2021-01-17 13:06:04 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-18 07:20:12 -0500 |
commit | 9cc50a0fce206cfecb973c9b061a2912b2361d3e (patch) | |
tree | b80fcf1cb404940fd9316b1f11e06859e71b2b3e /libraries/base | |
parent | 5f1d8be07c17d1c6cdf4c2454229e377c6d23015 (diff) | |
download | haskell-9cc50a0fce206cfecb973c9b061a2912b2361d3e.tar.gz |
Rectify Haddock typos for the Functor class
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Base.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs index 63760e9c7c..d1fe839cfe 100644 --- a/libraries/base/GHC/Base.hs +++ b/libraries/base/GHC/Base.hs @@ -493,6 +493,7 @@ class Functor f where -- -- Some type constructors with two parameters or more have a @'Data.Bifunctor'@ instance that allows -- both the last and the penultimate parameters to be mapped over. + -- -- ==== __Examples__ -- -- Convert from a @'Data.Maybe.Maybe' Int@ to a @Maybe String@ @@ -524,11 +525,11 @@ class Functor f where -- It may seem surprising that the function is only applied to the last element of the tuple -- compared to the list example above which applies it to every element in the list. -- To understand, remember that tuples are type constructors with multiple type parameters: - -- a tuple of 3 elements `(a,b,c)` can also be written `(,,) a b c` and its `Functor` instance - -- is defined for `Functor ((,,) a b)` (i.e., only the third parameter is free to be mapped over - -- with `fmap`). + -- a tuple of 3 elements @(a,b,c)@ can also be written @(,,) a b c@ and its @Functor@ instance + -- is defined for @Functor ((,,) a b)@ (i.e., only the third parameter is free to be mapped over + -- with @fmap@). -- - -- It explains why `fmap` can be used with tuples containing values of different types as in the + -- It explains why @fmap@ can be used with tuples containing values of different types as in the -- following example: -- -- >>> fmap even ("hello", 1.0, 4) |