diff options
author | Viktor Dukhovni <ietf-dane@dukhovni.org> | 2021-09-21 13:23:29 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-05 14:33:29 -0400 |
commit | 7059a72926e625c10695819b3e01cb63364bec2a (patch) | |
tree | 6cf97eef2883942b0fc95edfbdc7c45c9196bfba | |
parent | 000f2a30e0d77932275ac8d2b9d9e51191ff4e03 (diff) | |
download | haskell-7059a72926e625c10695819b3e01cb63364bec2a.tar.gz |
Add laws link and tweak Traversable class text
-rw-r--r-- | libraries/base/Data/Traversable.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libraries/base/Data/Traversable.hs b/libraries/base/Data/Traversable.hs index bf6ec96e79..c7a77ebfa1 100644 --- a/libraries/base/Data/Traversable.hs +++ b/libraries/base/Data/Traversable.hs @@ -124,11 +124,15 @@ import GHC.Tuple (Solo (..)) -- @Data.Traversable@ from other modules, but in the home module it should -- be possible to specify alternative link text. :-( --- | Functors representing data structures that can be traversed from --- left to right, performing an action on each element. +-- | Functors representing data structures that can be transformed to +-- structures of /same shape/ by performing an 'Applicative' (so also 'Monad') +-- action on each element from left to right. -- --- A more detailed description can be found in the overview section of --- "Data.Traversable#overview". +-- A more detailed description of what /same shape/ means, the various methods, +-- how traversals are constructed, and example advanced use-cases can be found +-- in the __Overview__ section of "Data.Traversable#overview". +-- +-- For the class laws see the __Laws__ section of "Data.Traversable#laws". -- class (Functor t, Foldable t) => Traversable t where {-# MINIMAL traverse | sequenceA #-} |