diff options
-rw-r--r-- | libraries/base/Data/Semigroup.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libraries/base/Data/Semigroup.hs b/libraries/base/Data/Semigroup.hs index bde40fa57a..3b123ad81e 100644 --- a/libraries/base/Data/Semigroup.hs +++ b/libraries/base/Data/Semigroup.hs @@ -286,7 +286,15 @@ instance Num a => Num (Max a) where -- | 'Arg' isn't itself a 'Semigroup' in its own right, but it can be -- placed inside 'Min' and 'Max' to compute an arg min or arg max. -data Arg a b = Arg a b deriving +-- +-- >>> minimum [ Arg (x * x) x | x <- [-10 .. 10] ] +-- Arg 0 0 +data Arg a b = Arg + a + -- ^ The argument used for comparisons in 'Eq' and 'Ord'. + b + -- ^ The "value" exposed via the 'Functor', 'Foldable' etc. instances. + deriving ( Show -- ^ @since 4.9.0.0 , Read -- ^ @since 4.9.0.0 , Data -- ^ @since 4.9.0.0 |