diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-11-04 11:43:29 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-11-04 11:53:58 +0100 |
commit | 1408c8dcd4ccf3c4f418ca8dd13516efb604922f (patch) | |
tree | 4864fe79ef54328f3d6ef3992af71d0482e427dc /libraries/base/Data/Traversable.hs | |
parent | fe178b2729bb044b401b3fe670d12bcd3d14ad71 (diff) | |
download | haskell-1408c8dcd4ccf3c4f418ca8dd13516efb604922f.tar.gz |
Remove redundant "Minimal complete definition"-comments
Those manual descriptions in Haddock strings have become redundant since
Haddock gained the ability to print the minimal complete definition as
specified via `{-# MINIMAL #-}` annotation (or otherwise inferred by
GHC).
Moreover, this commit moves all `{-# MINIMAL #-}` annotations in `base`
to the start of the respective `class` definitions, as this is more
readable and matches more closely the way Haddock renders that
information.
Diffstat (limited to 'libraries/base/Data/Traversable.hs')
-rw-r--r-- | libraries/base/Data/Traversable.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libraries/base/Data/Traversable.hs b/libraries/base/Data/Traversable.hs index 1c8b605f09..b78aa291a6 100644 --- a/libraries/base/Data/Traversable.hs +++ b/libraries/base/Data/Traversable.hs @@ -61,8 +61,6 @@ import qualified GHC.List as List ( foldr ) -- | Functors representing data structures that can be traversed from -- left to right. -- --- Minimal complete definition: 'traverse' or 'sequenceA'. --- -- A definition of 'traverse' must satisfy the following laws: -- -- [/naturality/] @@ -144,6 +142,8 @@ import qualified GHC.List as List ( foldr ) -- ('foldMapDefault'). -- class (Functor t, Foldable t) => Traversable t where + {-# MINIMAL traverse | sequenceA #-} + -- | Map each element of a structure to an action, evaluate -- these actions from left to right, and collect the results. traverse :: Applicative f => (a -> f b) -> t a -> f (t b) @@ -163,7 +163,6 @@ class (Functor t, Foldable t) => Traversable t where -- and collect the results. sequence :: Monad m => t (m a) -> m (t a) sequence = sequenceA - {-# MINIMAL traverse | sequenceA #-} -- instances for Prelude types |