diff options
author | code5hot <tristan.wibberley@gmail.com> | 2019-06-04 18:00:28 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-07 10:26:46 -0400 |
commit | 60db142ba2928f159a0df6fd2a7c1839addf6206 (patch) | |
tree | 9133c28f377796b8caa226bf36b952d4aa8ee832 /libraries/base/Data/Traversable.hs | |
parent | e87b9f8731460a7d8c0b45507be2d83935683d56 (diff) | |
download | haskell-60db142ba2928f159a0df6fd2a7c1839addf6206.tar.gz |
Update Traversable.hs with a note about an intuitive law
Diffstat (limited to 'libraries/base/Data/Traversable.hs')
-rw-r--r-- | libraries/base/Data/Traversable.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libraries/base/Data/Traversable.hs b/libraries/base/Data/Traversable.hs index a8647fdb28..bdb2dc3db8 100644 --- a/libraries/base/Data/Traversable.hs +++ b/libraries/base/Data/Traversable.hs @@ -115,7 +115,13 @@ import qualified GHC.List as List ( foldr ) -- 'Data.Functor.Compose.Compose' are from "Data.Functor.Identity" and -- "Data.Functor.Compose". -- --- (The naturality law is implied by parametricity.) +-- A result of the naturality law is the intuitive generalised identity law +-- for 'traverse' +-- +-- @'traverse' 'pure' = 'pure'@ +-- +-- (The naturality law is implied by parametricity and thus so is the +-- generalised identity law [reference not available, word of mouth].) -- -- Instances are similar to 'Functor', e.g. given a data type -- |