base-compat-0.11.1: A compatibility layer for base

Safe Haskell | Safe
Language | Haskell98

Data.Semigroup.Compat

Contents

- Semigroups
- Re-exported monoids from Data.Monoid
- A better monoid for Maybe
- Difference lists of a semigroup
- ArgMin, ArgMax

Description

This backports the modern Data.Semigroup interface back to `base-4.9`/GHC 8.0.

Synopsis

- class Semigroup a where
  - (<>) :: a -> a -> a
  - sconcat :: NonEmpty a -> a
  - stimes :: Integral b => b -> a -> a
- stimesMonoid :: (Integral b, Monoid a) => b -> a -> a
- stimesIdempotent :: Integral b => b -> a -> a
- stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
- mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
- newtype Min a = Min {
  - getMin :: a
  }
- newtype Max a = Max {
  - getMax :: a
  }
- newtype First a = First {
  - getFirst :: a
  }
- newtype Last a = Last {
  - getLast :: a
  }
- newtype WrappedMonoid m = WrapMonoid {
  - unwrapMonoid :: m
  }
- newtype Dual a = Dual {
  - getDual :: a
  }
- newtype Endo a = Endo {
  - appEndo :: a -> a
  }
- newtype All = All {
  - getAll :: Bool
  }
- newtype Any = Any {
  - getAny :: Bool
  }
- newtype Sum a = Sum {
  - getSum :: a
  }
- newtype Product a = Product {
  - getProduct :: a
  }
- newtype Option a = Option {
  - getOption :: Maybe a
  }
- option :: b -> (a -> b) -> Option a -> b
- diff :: Semigroup m => m -> Endo m
- cycle1 :: Semigroup m => m -> m
- data Arg a b = Arg a b
- type ArgMin a b = Min (Arg a b)
- type ArgMax a b = Max (Arg a b)

# Documentation

class Semigroup a where #

Minimal complete definition

(<>)

Methods

(<>) :: a -> a -> a #

sconcat :: NonEmpty a -> a #

stimes :: Integral b => b -> a -> a #

#### Instances

Instances details

Semigroup Ordering |
Instance details Defined in GHC.Base Methods (<>) :: Ordering -> Ordering -> Ordering # sconcat :: NonEmpty Ordering -> Ordering # stimes :: Integral b => b -> Ordering -> Ordering #
Semigroup () |
Instance details Defined in GHC.Base Methods (<>) :: () -> () -> () # sconcat :: NonEmpty () -> () # stimes :: Integral b => b -> () -> () #
Semigroup Any |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Any -> Any -> Any # sconcat :: NonEmpty Any -> Any # stimes :: Integral b => b -> Any -> Any #
Semigroup All |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: All -> All -> All # sconcat :: NonEmpty All -> All # stimes :: Integral b => b -> All -> All #
Semigroup Void |
Instance details Defined in Data.Void Methods (<>) :: Void -> Void -> Void # sconcat :: NonEmpty Void -> Void # stimes :: Integral b => b -> Void -> Void #
Semigroup [a] |
Instance details Defined in GHC.Base Methods (<>) :: [a] -> [a] -> [a] # sconcat :: NonEmpty [a] -> [a] # stimes :: Integral b => b -> [a] -> [a] #
Semigroup a => Semigroup (Maybe a) |
Instance details Defined in GHC.Base Methods (<>) :: Maybe a -> Maybe a -> Maybe a # sconcat :: NonEmpty (Maybe a) -> Maybe a # stimes :: Integral b => b -> Maybe a -> Maybe a #
Semigroup a => Semigroup (IO a) |
Instance details Defined in GHC.Base Methods (<>) :: IO a -> IO a -> IO a # sconcat :: NonEmpty (IO a) -> IO a # stimes :: Integral b => b -> IO a -> IO a #
Semigroup (NonEmpty a) |
Instance details Defined in GHC.Base Methods (<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a # sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a # stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #
Semigroup a => Semigroup (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Dual a -> Dual a -> Dual a # sconcat :: NonEmpty (Dual a) -> Dual a # stimes :: Integral b => b -> Dual a -> Dual a #
Semigroup (First a) |
Instance details Defined in Data.Monoid Methods (<>) :: First a -> First a -> First a # sconcat :: NonEmpty (First a) -> First a # stimes :: Integral b => b -> First a -> First a #
Semigroup a => Semigroup (Identity a) |
Instance details Defined in Data.Functor.Identity Methods (<>) :: Identity a -> Identity a -> Identity a # sconcat :: NonEmpty (Identity a) -> Identity a # stimes :: Integral b => b -> Identity a -> Identity a #
Semigroup (Last a) |
Instance details Defined in Data.Monoid Methods (<>) :: Last a -> Last a -> Last a # sconcat :: NonEmpty (Last a) -> Last a # stimes :: Integral b => b -> Last a -> Last a #
Num a => Semigroup (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Product a -> Product a -> Product a # sconcat :: NonEmpty (Product a) -> Product a # stimes :: Integral b => b -> Product a -> Product a #
Num a => Semigroup (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Sum a -> Sum a -> Sum a # sconcat :: NonEmpty (Sum a) -> Sum a # stimes :: Integral b => b -> Sum a -> Sum a #
Semigroup (Endo a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Endo a -> Endo a -> Endo a # sconcat :: NonEmpty (Endo a) -> Endo a # stimes :: Integral b => b -> Endo a -> Endo a #
Semigroup (Comparison a) |
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Comparison a -> Comparison a -> Comparison a # sconcat :: NonEmpty (Comparison a) -> Comparison a # stimes :: Integral b => b -> Comparison a -> Comparison a #
Semigroup (Equivalence a) |
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Equivalence a -> Equivalence a -> Equivalence a # sconcat :: NonEmpty (Equivalence a) -> Equivalence a # stimes :: Integral b => b -> Equivalence a -> Equivalence a #
Semigroup (Predicate a) |
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Predicate a -> Predicate a -> Predicate a # sconcat :: NonEmpty (Predicate a) -> Predicate a # stimes :: Integral b => b -> Predicate a -> Predicate a #
Semigroup (First a) |
Instance details Defined in Data.Semigroup Methods (<>) :: First a -> First a -> First a # sconcat :: NonEmpty (First a) -> First a # stimes :: Integral b => b -> First a -> First a #
Semigroup (Last a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Last a -> Last a -> Last a # sconcat :: NonEmpty (Last a) -> Last a # stimes :: Integral b => b -> Last a -> Last a #
Ord a => Semigroup (Max a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Max a -> Max a -> Max a # sconcat :: NonEmpty (Max a) -> Max a # stimes :: Integral b => b -> Max a -> Max a #
Ord a => Semigroup (Min a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Min a -> Min a -> Min a # sconcat :: NonEmpty (Min a) -> Min a # stimes :: Integral b => b -> Min a -> Min a #
Semigroup a => Semigroup (Option a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Option a -> Option a -> Option a # sconcat :: NonEmpty (Option a) -> Option a # stimes :: Integral b => b -> Option a -> Option a #
Monoid m => Semigroup (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # sconcat :: NonEmpty (WrappedMonoid m) -> WrappedMonoid m # stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m #
Semigroup b => Semigroup (a -> b) |
Instance details Defined in GHC.Base Methods (<>) :: (a -> b) -> (a -> b) -> a -> b # sconcat :: NonEmpty (a -> b) -> a -> b # stimes :: Integral b0 => b0 -> (a -> b) -> a -> b #
Semigroup (Either a b) |
Instance details Defined in Data.Either Methods (<>) :: Either a b -> Either a b -> Either a b # sconcat :: NonEmpty (Either a b) -> Either a b # stimes :: Integral b0 => b0 -> Either a b -> Either a b #
(Semigroup a, Semigroup b) => Semigroup (a, b) |
Instance details Defined in GHC.Base Methods (<>) :: (a, b) -> (a, b) -> (a, b) # sconcat :: NonEmpty (a, b) -> (a, b) # stimes :: Integral b0 => b0 -> (a, b) -> (a, b) #
Semigroup (Proxy s) |
Instance details Defined in Data.Proxy Methods (<>) :: Proxy s -> Proxy s -> Proxy s # sconcat :: NonEmpty (Proxy s) -> Proxy s # stimes :: Integral b => b -> Proxy s -> Proxy s #
Semigroup a => Semigroup (ST s a) |
Instance details Defined in GHC.ST Methods (<>) :: ST s a -> ST s a -> ST s a # sconcat :: NonEmpty (ST s a) -> ST s a # stimes :: Integral b => b -> ST s a -> ST s a #
Semigroup a => Semigroup (Op a b) |
Instance details Defined in Data.Functor.Contravariant Methods (<>) :: Op a b -> Op a b -> Op a b # sconcat :: NonEmpty (Op a b) -> Op a b # stimes :: Integral b0 => b0 -> Op a b -> Op a b #
(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) |
Instance details Defined in GHC.Base Methods (<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) # sconcat :: NonEmpty (a, b, c) -> (a, b, c) # stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) #
Alternative f => Semigroup (Alt f a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Alt f a -> Alt f a -> Alt f a # sconcat :: NonEmpty (Alt f a) -> Alt f a # stimes :: Integral b => b -> Alt f a -> Alt f a #
(Applicative f, Semigroup a) => Semigroup (Ap f a) |
Instance details Defined in Data.Monoid Methods (<>) :: Ap f a -> Ap f a -> Ap f a # sconcat :: NonEmpty (Ap f a) -> Ap f a # stimes :: Integral b => b -> Ap f a -> Ap f a #
Semigroup a => Semigroup (Const a b) |
Instance details Defined in Data.Functor.Const Methods (<>) :: Const a b -> Const a b -> Const a b # sconcat :: NonEmpty (Const a b) -> Const a b # stimes :: Integral b0 => b0 -> Const a b -> Const a b #
(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) |
Instance details Defined in GHC.Base Methods (<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) # sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) # stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) #
(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) |
Instance details Defined in GHC.Base Methods (<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) # stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) #

stimesMonoid :: (Integral b, Monoid a) => b -> a -> a #

stimesIdempotent :: Integral b => b -> a -> a #

stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a #

mtimesDefault :: (Integral b, Monoid a) => b -> a -> a #

# Semigroups

newtype Min a #

Constructors

Min |

Fields

- getMin :: a

#### Instances

Instances details

Monad Min |
Instance details Defined in Data.Semigroup Methods (>>=) :: Min a -> (a -> Min b) -> Min b # (>>) :: Min a -> Min b -> Min b # return :: a -> Min a #
Functor Min |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Min a -> Min b # (<$) :: a -> Min b -> Min a #
MonadFix Min |
Instance details Defined in Data.Semigroup Methods mfix :: (a -> Min a) -> Min a
Applicative Min |
Instance details Defined in Data.Semigroup Methods pure :: a -> Min a (<*>) :: Min (a -> b) -> Min a -> Min b liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c (*>) :: Min a -> Min b -> Min b (<*) :: Min a -> Min b -> Min a
Foldable Min |

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Min m -> m

foldMap :: Monoid m => (a -> m) -> Min a -> m

foldMap' :: Monoid m => (a -> m) -> Min a -> m

foldr :: (a -> b -> b) -> b -> Min a -> b

foldr' :: (a -> b -> b) -> b -> Min a -> b

foldl :: (b -> a -> b) -> b -> Min a -> b

foldl' :: (b -> a -> b) -> b -> Min a -> b

foldr1 :: (a -> a -> a) -> Min a -> a

foldl1 :: (a -> a -> a) -> Min a -> a

toList :: Min a -> [a]

null :: Min a -> Bool

length :: Min a -> Int

elem :: Eq a => a -> Min a -> Bool

maximum :: Ord a => Min a -> a

minimum :: Ord a => Min a -> a

sum :: Num a => Min a -> a

product :: Num a => Min a -> a

Traversable Min |
Instance details Defined in Data.Semigroup Methods traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) sequenceA :: Applicative f => Min (f a) -> f (Min a) mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) # sequence :: Monad m => Min (m a) -> m (Min a) #
Bounded a => Bounded (Min a) |
Instance details Defined in Data.Semigroup Methods minBound :: Min a maxBound :: Min a
Enum a => Enum (Min a) |
Instance details Defined in Data.Semigroup Methods succ :: Min a -> Min a pred :: Min a -> Min a toEnum :: Int -> Min a fromEnum :: Min a -> Int enumFrom :: Min a -> [Min a] enumFromThen :: Min a -> Min a -> [Min a] enumFromTo :: Min a -> Min a -> [Min a] enumFromThenTo :: Min a -> Min a -> Min a -> [Min a]
Eq a => Eq (Min a) |
Instance details Defined in Data.Semigroup Methods (==) :: Min a -> Min a -> Bool (/=) :: Min a -> Min a -> Bool
Data a => Data (Min a) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Min a -> c (Min a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Min a)

toConstr :: Min a -> Constr

dataTypeOf :: Min a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Min a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Min a))

gmapT :: (forall b. Data b => b -> b) -> Min a -> Min a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Min a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Min a -> r

gmapQ :: (forall d. Data d => d -> u) -> Min a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Min a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Min a -> m (Min a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Min a -> m (Min a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Min a -> m (Min a)

Num a => Num (Min a) |
Instance details Defined in Data.Semigroup Methods (+) :: Min a -> Min a -> Min a (-) :: Min a -> Min a -> Min a (*) :: Min a -> Min a -> Min a negate :: Min a -> Min a abs :: Min a -> Min a signum :: Min a -> Min a fromInteger :: Integer -> Min a
Ord a => Ord (Min a) |
Instance details Defined in Data.Semigroup Methods compare :: Min a -> Min a -> Ordering (<) :: Min a -> Min a -> Bool (<=) :: Min a -> Min a -> Bool (>) :: Min a -> Min a -> Bool (>=) :: Min a -> Min a -> Bool max :: Min a -> Min a -> Min a min :: Min a -> Min a -> Min a
Read a => Read (Min a) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (Min a) # readList :: ReadS [Min a] # readPrec :: ReadPrec (Min a) # readListPrec :: ReadPrec [Min a] #
Show a => Show (Min a) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Min a -> ShowS show :: Min a -> String showList :: [Min a] -> ShowS
Generic (Min a) |
Instance details Defined in Data.Semigroup Associated Types type Rep (Min a) :: Type -> Type Methods from :: Min a -> Rep (Min a) x to :: Rep (Min a) x -> Min a
Ord a => Semigroup (Min a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Min a -> Min a -> Min a # sconcat :: NonEmpty (Min a) -> Min a # stimes :: Integral b => b -> Min a -> Min a #
(Ord a, Bounded a) => Monoid (Min a) |
Instance details Defined in Data.Semigroup Methods mempty :: Min a # mappend :: Min a -> Min a -> Min a # mconcat :: [Min a] -> Min a #
Generic1 Min |
Instance details Defined in Data.Semigroup Associated Types type Rep1 Min :: k -> Type Methods from1 :: forall (a :: k). Min a -> Rep1 Min a to1 :: forall (a :: k). Rep1 Min a -> Min a
type Rep (Min a) |
Instance details Defined in Data.Semigroup type Rep (Min a) = D1 ('MetaData "Min" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Min" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 Min |
Instance details Defined in Data.Semigroup type Rep1 Min = D1 ('MetaData "Min" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Min" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Max a #

Constructors

Max |

Fields

- getMax :: a

#### Instances

Instances details

Monad Max |
Instance details Defined in Data.Semigroup Methods (>>=) :: Max a -> (a -> Max b) -> Max b # (>>) :: Max a -> Max b -> Max b # return :: a -> Max a #
Functor Max |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Max a -> Max b # (<$) :: a -> Max b -> Max a #
MonadFix Max |
Instance details Defined in Data.Semigroup Methods mfix :: (a -> Max a) -> Max a
Applicative Max |
Instance details Defined in Data.Semigroup Methods pure :: a -> Max a (<*>) :: Max (a -> b) -> Max a -> Max b liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c (*>) :: Max a -> Max b -> Max b (<*) :: Max a -> Max b -> Max a
Foldable Max |

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Max m -> m

foldMap :: Monoid m => (a -> m) -> Max a -> m

foldMap' :: Monoid m => (a -> m) -> Max a -> m

foldr :: (a -> b -> b) -> b -> Max a -> b

foldr' :: (a -> b -> b) -> b -> Max a -> b

foldl :: (b -> a -> b) -> b -> Max a -> b

foldl' :: (b -> a -> b) -> b -> Max a -> b

foldr1 :: (a -> a -> a) -> Max a -> a

foldl1 :: (a -> a -> a) -> Max a -> a

toList :: Max a -> [a]

null :: Max a -> Bool

length :: Max a -> Int

elem :: Eq a => a -> Max a -> Bool

maximum :: Ord a => Max a -> a

minimum :: Ord a => Max a -> a

sum :: Num a => Max a -> a

product :: Num a => Max a -> a

Traversable Max |
Instance details Defined in Data.Semigroup Methods traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) sequenceA :: Applicative f => Max (f a) -> f (Max a) mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) # sequence :: Monad m => Max (m a) -> m (Max a) #
Bounded a => Bounded (Max a) |
Instance details Defined in Data.Semigroup Methods minBound :: Max a maxBound :: Max a
Enum a => Enum (Max a) |
Instance details Defined in Data.Semigroup Methods succ :: Max a -> Max a pred :: Max a -> Max a toEnum :: Int -> Max a fromEnum :: Max a -> Int enumFrom :: Max a -> [Max a] enumFromThen :: Max a -> Max a -> [Max a] enumFromTo :: Max a -> Max a -> [Max a] enumFromThenTo :: Max a -> Max a -> Max a -> [Max a]
Eq a => Eq (Max a) |
Instance details Defined in Data.Semigroup Methods (==) :: Max a -> Max a -> Bool (/=) :: Max a -> Max a -> Bool
Data a => Data (Max a) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Max a -> c (Max a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Max a)

toConstr :: Max a -> Constr

dataTypeOf :: Max a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Max a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Max a))

gmapT :: (forall b. Data b => b -> b) -> Max a -> Max a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r

gmapQ :: (forall d. Data d => d -> u) -> Max a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Max a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Max a -> m (Max a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a)

Num a => Num (Max a) |
Instance details Defined in Data.Semigroup Methods (+) :: Max a -> Max a -> Max a (-) :: Max a -> Max a -> Max a (*) :: Max a -> Max a -> Max a negate :: Max a -> Max a abs :: Max a -> Max a signum :: Max a -> Max a fromInteger :: Integer -> Max a
Ord a => Ord (Max a) |
Instance details Defined in Data.Semigroup Methods compare :: Max a -> Max a -> Ordering (<) :: Max a -> Max a -> Bool (<=) :: Max a -> Max a -> Bool (>) :: Max a -> Max a -> Bool (>=) :: Max a -> Max a -> Bool max :: Max a -> Max a -> Max a min :: Max a -> Max a -> Max a
Read a => Read (Max a) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (Max a) # readList :: ReadS [Max a] # readPrec :: ReadPrec (Max a) # readListPrec :: ReadPrec [Max a] #
Show a => Show (Max a) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Max a -> ShowS show :: Max a -> String showList :: [Max a] -> ShowS
Generic (Max a) |
Instance details Defined in Data.Semigroup Associated Types type Rep (Max a) :: Type -> Type Methods from :: Max a -> Rep (Max a) x to :: Rep (Max a) x -> Max a
Ord a => Semigroup (Max a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Max a -> Max a -> Max a # sconcat :: NonEmpty (Max a) -> Max a # stimes :: Integral b => b -> Max a -> Max a #
(Ord a, Bounded a) => Monoid (Max a) |
Instance details Defined in Data.Semigroup Methods mempty :: Max a # mappend :: Max a -> Max a -> Max a # mconcat :: [Max a] -> Max a #
Generic1 Max |
Instance details Defined in Data.Semigroup Associated Types type Rep1 Max :: k -> Type Methods from1 :: forall (a :: k). Max a -> Rep1 Max a to1 :: forall (a :: k). Rep1 Max a -> Max a
type Rep (Max a) |
Instance details Defined in Data.Semigroup type Rep (Max a) = D1 ('MetaData "Max" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Max" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 Max |
Instance details Defined in Data.Semigroup type Rep1 Max = D1 ('MetaData "Max" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Max" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype First a #

Constructors

First |

Fields

- getFirst :: a

#### Instances

Instances details

Monad First |
Instance details Defined in Data.Semigroup Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Functor First |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
MonadFix First |
Instance details Defined in Data.Semigroup Methods mfix :: (a -> First a) -> First a
Applicative First |
Instance details Defined in Data.Semigroup Methods pure :: a -> First a (<*>) :: First (a -> b) -> First a -> First b liftA2 :: (a -> b -> c) -> First a -> First b -> First c (*>) :: First a -> First b -> First b (<*) :: First a -> First b -> First a
Foldable First |

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => First m -> m

foldMap :: Monoid m => (a -> m) -> First a -> m

foldMap' :: Monoid m => (a -> m) -> First a -> m

foldr :: (a -> b -> b) -> b -> First a -> b

foldr' :: (a -> b -> b) -> b -> First a -> b

foldl :: (b -> a -> b) -> b -> First a -> b

foldl' :: (b -> a -> b) -> b -> First a -> b

foldr1 :: (a -> a -> a) -> First a -> a

foldl1 :: (a -> a -> a) -> First a -> a

toList :: First a -> [a]

null :: First a -> Bool

length :: First a -> Int

elem :: Eq a => a -> First a -> Bool

maximum :: Ord a => First a -> a

minimum :: Ord a => First a -> a

sum :: Num a => First a -> a

product :: Num a => First a -> a

Traversable First |
Instance details Defined in Data.Semigroup Methods traverse :: Applicative f => (a -> f b) -> First a -> f (First b) sequenceA :: Applicative f => First (f a) -> f (First a) mapM :: Monad m => (a -> m b) -> First a -> m (First b) # sequence :: Monad m => First (m a) -> m (First a) #
Bounded a => Bounded (First a) |
Instance details Defined in Data.Semigroup Methods minBound :: First a maxBound :: First a
Enum a => Enum (First a) |
Instance details Defined in Data.Semigroup Methods succ :: First a -> First a pred :: First a -> First a toEnum :: Int -> First a fromEnum :: First a -> Int enumFrom :: First a -> [First a] enumFromThen :: First a -> First a -> [First a] enumFromTo :: First a -> First a -> [First a] enumFromThenTo :: First a -> First a -> First a -> [First a]
Eq a => Eq (First a) |
Instance details Defined in Data.Semigroup Methods (==) :: First a -> First a -> Bool (/=) :: First a -> First a -> Bool
Data a => Data (First a) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> First a -> c (First a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (First a)

toConstr :: First a -> Constr

dataTypeOf :: First a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (First a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (First a))

gmapT :: (forall b. Data b => b -> b) -> First a -> First a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r

gmapQ :: (forall d. Data d => d -> u) -> First a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> First a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> First a -> m (First a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a)

Ord a => Ord (First a) |
Instance details Defined in Data.Semigroup Methods compare :: First a -> First a -> Ordering (<) :: First a -> First a -> Bool (<=) :: First a -> First a -> Bool (>) :: First a -> First a -> Bool (>=) :: First a -> First a -> Bool max :: First a -> First a -> First a min :: First a -> First a -> First a
Read a => Read (First a) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (First a) # readList :: ReadS [First a] # readPrec :: ReadPrec (First a) # readListPrec :: ReadPrec [First a] #
Show a => Show (First a) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> First a -> ShowS show :: First a -> String showList :: [First a] -> ShowS
Generic (First a) |
Instance details Defined in Data.Semigroup Associated Types type Rep (First a) :: Type -> Type Methods from :: First a -> Rep (First a) x to :: Rep (First a) x -> First a
Semigroup (First a) |
Instance details Defined in Data.Semigroup Methods (<>) :: First a -> First a -> First a # sconcat :: NonEmpty (First a) -> First a # stimes :: Integral b => b -> First a -> First a #
Generic1 First |
Instance details Defined in Data.Semigroup Associated Types type Rep1 First :: k -> Type Methods from1 :: forall (a :: k). First a -> Rep1 First a to1 :: forall (a :: k). Rep1 First a -> First a
type Rep (First a) |
Instance details Defined in Data.Semigroup type Rep (First a) = D1 ('MetaData "First" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 First |
Instance details Defined in Data.Semigroup type Rep1 First = D1 ('MetaData "First" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Last a #

Constructors

Last |

Fields

- getLast :: a

#### Instances

Instances details

Monad Last |
Instance details Defined in Data.Semigroup Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Functor Last |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
MonadFix Last |
Instance details Defined in Data.Semigroup Methods mfix :: (a -> Last a) -> Last a
Applicative Last |
Instance details Defined in Data.Semigroup Methods pure :: a -> Last a (<*>) :: Last (a -> b) -> Last a -> Last b liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c (*>) :: Last a -> Last b -> Last b (<*) :: Last a -> Last b -> Last a
Foldable Last |

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Last m -> m

foldMap :: Monoid m => (a -> m) -> Last a -> m

foldMap' :: Monoid m => (a -> m) -> Last a -> m

foldr :: (a -> b -> b) -> b -> Last a -> b

foldr' :: (a -> b -> b) -> b -> Last a -> b

foldl :: (b -> a -> b) -> b -> Last a -> b

foldl' :: (b -> a -> b) -> b -> Last a -> b

foldr1 :: (a -> a -> a) -> Last a -> a

foldl1 :: (a -> a -> a) -> Last a -> a

toList :: Last a -> [a]

null :: Last a -> Bool

length :: Last a -> Int

elem :: Eq a => a -> Last a -> Bool

maximum :: Ord a => Last a -> a

minimum :: Ord a => Last a -> a

sum :: Num a => Last a -> a

product :: Num a => Last a -> a

Traversable Last |
Instance details Defined in Data.Semigroup Methods traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) sequenceA :: Applicative f => Last (f a) -> f (Last a) mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) # sequence :: Monad m => Last (m a) -> m (Last a) #
Bounded a => Bounded (Last a) |
Instance details Defined in Data.Semigroup Methods minBound :: Last a maxBound :: Last a
Enum a => Enum (Last a) |
Instance details Defined in Data.Semigroup Methods succ :: Last a -> Last a pred :: Last a -> Last a toEnum :: Int -> Last a fromEnum :: Last a -> Int enumFrom :: Last a -> [Last a] enumFromThen :: Last a -> Last a -> [Last a] enumFromTo :: Last a -> Last a -> [Last a] enumFromThenTo :: Last a -> Last a -> Last a -> [Last a]
Eq a => Eq (Last a) |
Instance details Defined in Data.Semigroup Methods (==) :: Last a -> Last a -> Bool (/=) :: Last a -> Last a -> Bool
Data a => Data (Last a) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Last a -> c (Last a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Last a)

toConstr :: Last a -> Constr

dataTypeOf :: Last a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Last a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Last a))

gmapT :: (forall b. Data b => b -> b) -> Last a -> Last a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r

gmapQ :: (forall d. Data d => d -> u) -> Last a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Last a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Last a -> m (Last a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a)

Ord a => Ord (Last a) |
Instance details Defined in Data.Semigroup Methods compare :: Last a -> Last a -> Ordering (<) :: Last a -> Last a -> Bool (<=) :: Last a -> Last a -> Bool (>) :: Last a -> Last a -> Bool (>=) :: Last a -> Last a -> Bool max :: Last a -> Last a -> Last a min :: Last a -> Last a -> Last a
Read a => Read (Last a) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (Last a) # readList :: ReadS [Last a] # readPrec :: ReadPrec (Last a) # readListPrec :: ReadPrec [Last a] #
Show a => Show (Last a) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Last a -> ShowS show :: Last a -> String showList :: [Last a] -> ShowS
Generic (Last a) |
Instance details Defined in Data.Semigroup Associated Types type Rep (Last a) :: Type -> Type Methods from :: Last a -> Rep (Last a) x to :: Rep (Last a) x -> Last a
Semigroup (Last a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Last a -> Last a -> Last a # sconcat :: NonEmpty (Last a) -> Last a # stimes :: Integral b => b -> Last a -> Last a #
Generic1 Last |
Instance details Defined in Data.Semigroup Associated Types type Rep1 Last :: k -> Type Methods from1 :: forall (a :: k). Last a -> Rep1 Last a to1 :: forall (a :: k). Rep1 Last a -> Last a
type Rep (Last a) |
Instance details Defined in Data.Semigroup type Rep (Last a) = D1 ('MetaData "Last" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Last" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 Last |
Instance details Defined in Data.Semigroup type Rep1 Last = D1 ('MetaData "Last" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Last" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype WrappedMonoid m #

Constructors

WrapMonoid |

Fields

- unwrapMonoid :: m

#### Instances

Instances details

Bounded m => Bounded (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods minBound :: WrappedMonoid m maxBound :: WrappedMonoid m
Enum a => Enum (WrappedMonoid a) |

Instance details

Defined in Data.Semigroup

Methods

succ :: WrappedMonoid a -> WrappedMonoid a

pred :: WrappedMonoid a -> WrappedMonoid a

toEnum :: Int -> WrappedMonoid a

fromEnum :: WrappedMonoid a -> Int

enumFrom :: WrappedMonoid a -> [WrappedMonoid a]

enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a]

enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a]

enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a]

Eq m => Eq (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool (/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool
Data m => Data (WrappedMonoid m) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonoid m -> c (WrappedMonoid m)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m)

toConstr :: WrappedMonoid m -> Constr

dataTypeOf :: WrappedMonoid m -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m))

gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m)

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m)

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m)

Ord m => Ord (WrappedMonoid m) |

Instance details

Defined in Data.Semigroup

Methods

compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering

(<) :: WrappedMonoid m -> WrappedMonoid m -> Bool

(<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool

(>) :: WrappedMonoid m -> WrappedMonoid m -> Bool

(>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool

max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m

min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m

Read m => Read (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (WrappedMonoid m) # readList :: ReadS [WrappedMonoid m] # readPrec :: ReadPrec (WrappedMonoid m) # readListPrec :: ReadPrec [WrappedMonoid m] #
Show m => Show (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> WrappedMonoid m -> ShowS show :: WrappedMonoid m -> String showList :: [WrappedMonoid m] -> ShowS
Generic (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Associated Types type Rep (WrappedMonoid m) :: Type -> Type Methods from :: WrappedMonoid m -> Rep (WrappedMonoid m) x to :: Rep (WrappedMonoid m) x -> WrappedMonoid m
Monoid m => Semigroup (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # sconcat :: NonEmpty (WrappedMonoid m) -> WrappedMonoid m # stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m #
Monoid m => Monoid (WrappedMonoid m) |
Instance details Defined in Data.Semigroup Methods mempty :: WrappedMonoid m # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # mconcat :: [WrappedMonoid m] -> WrappedMonoid m #
Generic1 WrappedMonoid |
Instance details Defined in Data.Semigroup Associated Types type Rep1 WrappedMonoid :: k -> Type Methods from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a
type Rep (WrappedMonoid m) |
Instance details Defined in Data.Semigroup type Rep (WrappedMonoid m) = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)))
type Rep1 WrappedMonoid |
Instance details Defined in Data.Semigroup type Rep1 WrappedMonoid = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

# Re-exported monoids from Data.Monoid

newtype Dual a #

Constructors

Dual |

Fields

- getDual :: a

#### Instances

Instances details

Monad Dual |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Dual a -> (a -> Dual b) -> Dual b # (>>) :: Dual a -> Dual b -> Dual b # return :: a -> Dual a #
Functor Dual |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Dual a -> Dual b # (<$) :: a -> Dual b -> Dual a #
Applicative Dual |
Instance details Defined in Data.Semigroup.Internal Methods pure :: a -> Dual a (<*>) :: Dual (a -> b) -> Dual a -> Dual b liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c (*>) :: Dual a -> Dual b -> Dual b (<*) :: Dual a -> Dual b -> Dual a
Foldable Dual |

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m

foldMap :: Monoid m => (a -> m) -> Dual a -> m

foldMap' :: Monoid m => (a -> m) -> Dual a -> m

foldr :: (a -> b -> b) -> b -> Dual a -> b

foldr' :: (a -> b -> b) -> b -> Dual a -> b

foldl :: (b -> a -> b) -> b -> Dual a -> b

foldl' :: (b -> a -> b) -> b -> Dual a -> b

foldr1 :: (a -> a -> a) -> Dual a -> a

foldl1 :: (a -> a -> a) -> Dual a -> a

toList :: Dual a -> [a]

null :: Dual a -> Bool

length :: Dual a -> Int

elem :: Eq a => a -> Dual a -> Bool

maximum :: Ord a => Dual a -> a

minimum :: Ord a => Dual a -> a

sum :: Num a => Dual a -> a

product :: Num a => Dual a -> a

Traversable Dual |
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) sequenceA :: Applicative f => Dual (f a) -> f (Dual a) mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) # sequence :: Monad m => Dual (m a) -> m (Dual a) #
Bounded a => Bounded (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods minBound :: Dual a maxBound :: Dual a
Eq a => Eq (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods (==) :: Dual a -> Dual a -> Bool (/=) :: Dual a -> Dual a -> Bool
Ord a => Ord (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods compare :: Dual a -> Dual a -> Ordering (<) :: Dual a -> Dual a -> Bool (<=) :: Dual a -> Dual a -> Bool (>) :: Dual a -> Dual a -> Bool (>=) :: Dual a -> Dual a -> Bool max :: Dual a -> Dual a -> Dual a min :: Dual a -> Dual a -> Dual a
Read a => Read (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods readsPrec :: Int -> ReadS (Dual a) # readList :: ReadS [Dual a] # readPrec :: ReadPrec (Dual a) # readListPrec :: ReadPrec [Dual a] #
Show a => Show (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods showsPrec :: Int -> Dual a -> ShowS show :: Dual a -> String showList :: [Dual a] -> ShowS
Generic (Dual a) |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep (Dual a) :: Type -> Type Methods from :: Dual a -> Rep (Dual a) x to :: Rep (Dual a) x -> Dual a
Semigroup a => Semigroup (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Dual a -> Dual a -> Dual a # sconcat :: NonEmpty (Dual a) -> Dual a # stimes :: Integral b => b -> Dual a -> Dual a #
Monoid a => Monoid (Dual a) |
Instance details Defined in Data.Semigroup.Internal Methods mempty :: Dual a # mappend :: Dual a -> Dual a -> Dual a # mconcat :: [Dual a] -> Dual a #
Generic1 Dual |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep1 Dual :: k -> Type Methods from1 :: forall (a :: k). Dual a -> Rep1 Dual a to1 :: forall (a :: k). Rep1 Dual a -> Dual a
type Rep (Dual a) |
Instance details Defined in Data.Semigroup.Internal type Rep (Dual a) = D1 ('MetaData "Dual" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Dual" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 Dual |
Instance details Defined in Data.Semigroup.Internal type Rep1 Dual = D1 ('MetaData "Dual" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Dual" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Endo a #

Constructors

Endo |

Fields

- appEndo :: a -> a

#### Instances

Instances details

Generic (Endo a) |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep (Endo a) :: Type -> Type Methods from :: Endo a -> Rep (Endo a) x to :: Rep (Endo a) x -> Endo a
Semigroup (Endo a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Endo a -> Endo a -> Endo a # sconcat :: NonEmpty (Endo a) -> Endo a # stimes :: Integral b => b -> Endo a -> Endo a #
Monoid (Endo a) |
Instance details Defined in Data.Semigroup.Internal Methods mempty :: Endo a # mappend :: Endo a -> Endo a -> Endo a # mconcat :: [Endo a] -> Endo a #
type Rep (Endo a) |
Instance details Defined in Data.Semigroup.Internal type Rep (Endo a) = D1 ('MetaData "Endo" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Endo" 'PrefixI 'True) (S1 ('MetaSel ('Just "appEndo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a -> a))))

newtype All #

Constructors

All |

Fields

- getAll :: Bool

#### Instances

Instances details

Bounded All |
Instance details Defined in Data.Semigroup.Internal Methods minBound :: All maxBound :: All
Eq All |
Instance details Defined in Data.Semigroup.Internal Methods (==) :: All -> All -> Bool (/=) :: All -> All -> Bool
Ord All |
Instance details Defined in Data.Semigroup.Internal Methods compare :: All -> All -> Ordering (<) :: All -> All -> Bool (<=) :: All -> All -> Bool (>) :: All -> All -> Bool (>=) :: All -> All -> Bool max :: All -> All -> All min :: All -> All -> All
Read All |
Instance details Defined in Data.Semigroup.Internal Methods readsPrec :: Int -> ReadS All # readList :: ReadS [All] # readPrec :: ReadPrec All # readListPrec :: ReadPrec [All] #
Show All |
Instance details Defined in Data.Semigroup.Internal Methods showsPrec :: Int -> All -> ShowS show :: All -> String showList :: [All] -> ShowS
Generic All |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep All :: Type -> Type Methods from :: All -> Rep All x to :: Rep All x -> All
Semigroup All |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: All -> All -> All # sconcat :: NonEmpty All -> All # stimes :: Integral b => b -> All -> All #
Monoid All |
Instance details Defined in Data.Semigroup.Internal Methods mempty :: All # mappend :: All -> All -> All # mconcat :: [All] -> All #
type Rep All |
Instance details Defined in Data.Semigroup.Internal type Rep All = D1 ('MetaData "All" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "All" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

newtype Any #

Constructors

Any |

Fields

- getAny :: Bool

#### Instances

Instances details

Bounded Any |
Instance details Defined in Data.Semigroup.Internal Methods minBound :: Any maxBound :: Any
Eq Any |
Instance details Defined in Data.Semigroup.Internal Methods (==) :: Any -> Any -> Bool (/=) :: Any -> Any -> Bool
Ord Any |
Instance details Defined in Data.Semigroup.Internal Methods compare :: Any -> Any -> Ordering (<) :: Any -> Any -> Bool (<=) :: Any -> Any -> Bool (>) :: Any -> Any -> Bool (>=) :: Any -> Any -> Bool max :: Any -> Any -> Any min :: Any -> Any -> Any
Read Any |
Instance details Defined in Data.Semigroup.Internal Methods readsPrec :: Int -> ReadS Any # readList :: ReadS [Any] # readPrec :: ReadPrec Any # readListPrec :: ReadPrec [Any] #
Show Any |
Instance details Defined in Data.Semigroup.Internal Methods showsPrec :: Int -> Any -> ShowS show :: Any -> String showList :: [Any] -> ShowS
Generic Any |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep Any :: Type -> Type Methods from :: Any -> Rep Any x to :: Rep Any x -> Any
Semigroup Any |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Any -> Any -> Any # sconcat :: NonEmpty Any -> Any # stimes :: Integral b => b -> Any -> Any #
Monoid Any |
Instance details Defined in Data.Semigroup.Internal Methods mempty :: Any # mappend :: Any -> Any -> Any # mconcat :: [Any] -> Any #
type Rep Any |
Instance details Defined in Data.Semigroup.Internal type Rep Any = D1 ('MetaData "Any" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Any" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAny") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

newtype Sum a #

Constructors

Sum |

Fields

- getSum :: a

#### Instances

Instances details

Monad Sum |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Sum a -> (a -> Sum b) -> Sum b # (>>) :: Sum a -> Sum b -> Sum b # return :: a -> Sum a #
Functor Sum |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Sum a -> Sum b # (<$) :: a -> Sum b -> Sum a #
Applicative Sum |
Instance details Defined in Data.Semigroup.Internal Methods pure :: a -> Sum a (<*>) :: Sum (a -> b) -> Sum a -> Sum b liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c (*>) :: Sum a -> Sum b -> Sum b (<*) :: Sum a -> Sum b -> Sum a
Foldable Sum |

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m

foldMap :: Monoid m => (a -> m) -> Sum a -> m

foldMap' :: Monoid m => (a -> m) -> Sum a -> m

foldr :: (a -> b -> b) -> b -> Sum a -> b

foldr' :: (a -> b -> b) -> b -> Sum a -> b

foldl :: (b -> a -> b) -> b -> Sum a -> b

foldl' :: (b -> a -> b) -> b -> Sum a -> b

foldr1 :: (a -> a -> a) -> Sum a -> a

foldl1 :: (a -> a -> a) -> Sum a -> a

toList :: Sum a -> [a]

null :: Sum a -> Bool

length :: Sum a -> Int

elem :: Eq a => a -> Sum a -> Bool

maximum :: Ord a => Sum a -> a

minimum :: Ord a => Sum a -> a

sum :: Num a => Sum a -> a

product :: Num a => Sum a -> a

Traversable Sum |
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) sequenceA :: Applicative f => Sum (f a) -> f (Sum a) mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) # sequence :: Monad m => Sum (m a) -> m (Sum a) #
Bounded a => Bounded (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods minBound :: Sum a maxBound :: Sum a
Eq a => Eq (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods (==) :: Sum a -> Sum a -> Bool (/=) :: Sum a -> Sum a -> Bool
Num a => Num (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods (+) :: Sum a -> Sum a -> Sum a (-) :: Sum a -> Sum a -> Sum a (*) :: Sum a -> Sum a -> Sum a negate :: Sum a -> Sum a abs :: Sum a -> Sum a signum :: Sum a -> Sum a fromInteger :: Integer -> Sum a
Ord a => Ord (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods compare :: Sum a -> Sum a -> Ordering (<) :: Sum a -> Sum a -> Bool (<=) :: Sum a -> Sum a -> Bool (>) :: Sum a -> Sum a -> Bool (>=) :: Sum a -> Sum a -> Bool max :: Sum a -> Sum a -> Sum a min :: Sum a -> Sum a -> Sum a
Read a => Read (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods readsPrec :: Int -> ReadS (Sum a) # readList :: ReadS [Sum a] # readPrec :: ReadPrec (Sum a) # readListPrec :: ReadPrec [Sum a] #
Show a => Show (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods showsPrec :: Int -> Sum a -> ShowS show :: Sum a -> String showList :: [Sum a] -> ShowS
Generic (Sum a) |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep (Sum a) :: Type -> Type Methods from :: Sum a -> Rep (Sum a) x to :: Rep (Sum a) x -> Sum a
Num a => Semigroup (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Sum a -> Sum a -> Sum a # sconcat :: NonEmpty (Sum a) -> Sum a # stimes :: Integral b => b -> Sum a -> Sum a #
Num a => Monoid (Sum a) |
Instance details Defined in Data.Semigroup.Internal Methods mempty :: Sum a # mappend :: Sum a -> Sum a -> Sum a # mconcat :: [Sum a] -> Sum a #
Generic1 Sum |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep1 Sum :: k -> Type Methods from1 :: forall (a :: k). Sum a -> Rep1 Sum a to1 :: forall (a :: k). Rep1 Sum a -> Sum a
type Rep (Sum a) |
Instance details Defined in Data.Semigroup.Internal type Rep (Sum a) = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 Sum |
Instance details Defined in Data.Semigroup.Internal type Rep1 Sum = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Product a #

Constructors

Product |

Fields

- getProduct :: a

#### Instances

Instances details

Monad Product |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Product a -> (a -> Product b) -> Product b # (>>) :: Product a -> Product b -> Product b # return :: a -> Product a #
Functor Product |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Product a -> Product b # (<$) :: a -> Product b -> Product a #
Applicative Product |
Instance details Defined in Data.Semigroup.Internal Methods pure :: a -> Product a (<*>) :: Product (a -> b) -> Product a -> Product b liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c (*>) :: Product a -> Product b -> Product b (<*) :: Product a -> Product b -> Product a
Foldable Product |

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m

foldMap :: Monoid m => (a -> m) -> Product a -> m

foldMap' :: Monoid m => (a -> m) -> Product a -> m

foldr :: (a -> b -> b) -> b -> Product a -> b

foldr' :: (a -> b -> b) -> b -> Product a -> b

foldl :: (b -> a -> b) -> b -> Product a -> b

foldl' :: (b -> a -> b) -> b -> Product a -> b

foldr1 :: (a -> a -> a) -> Product a -> a

foldl1 :: (a -> a -> a) -> Product a -> a

toList :: Product a -> [a]

null :: Product a -> Bool

length :: Product a -> Int

elem :: Eq a => a -> Product a -> Bool

maximum :: Ord a => Product a -> a

minimum :: Ord a => Product a -> a

sum :: Num a => Product a -> a

product :: Num a => Product a -> a

Traversable Product |
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) sequenceA :: Applicative f => Product (f a) -> f (Product a) mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) # sequence :: Monad m => Product (m a) -> m (Product a) #
Bounded a => Bounded (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods minBound :: Product a maxBound :: Product a
Eq a => Eq (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods (==) :: Product a -> Product a -> Bool (/=) :: Product a -> Product a -> Bool
Num a => Num (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods (+) :: Product a -> Product a -> Product a (-) :: Product a -> Product a -> Product a (*) :: Product a -> Product a -> Product a negate :: Product a -> Product a abs :: Product a -> Product a signum :: Product a -> Product a fromInteger :: Integer -> Product a
Ord a => Ord (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods compare :: Product a -> Product a -> Ordering (<) :: Product a -> Product a -> Bool (<=) :: Product a -> Product a -> Bool (>) :: Product a -> Product a -> Bool (>=) :: Product a -> Product a -> Bool max :: Product a -> Product a -> Product a min :: Product a -> Product a -> Product a
Read a => Read (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods readsPrec :: Int -> ReadS (Product a) # readList :: ReadS [Product a] # readPrec :: ReadPrec (Product a) # readListPrec :: ReadPrec [Product a] #
Show a => Show (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods showsPrec :: Int -> Product a -> ShowS show :: Product a -> String showList :: [Product a] -> ShowS
Generic (Product a) |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep (Product a) :: Type -> Type Methods from :: Product a -> Rep (Product a) x to :: Rep (Product a) x -> Product a
Num a => Semigroup (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods (<>) :: Product a -> Product a -> Product a # sconcat :: NonEmpty (Product a) -> Product a # stimes :: Integral b => b -> Product a -> Product a #
Num a => Monoid (Product a) |
Instance details Defined in Data.Semigroup.Internal Methods mempty :: Product a # mappend :: Product a -> Product a -> Product a # mconcat :: [Product a] -> Product a #
Generic1 Product |
Instance details Defined in Data.Semigroup.Internal Associated Types type Rep1 Product :: k -> Type Methods from1 :: forall (a :: k). Product a -> Rep1 Product a to1 :: forall (a :: k). Rep1 Product a -> Product a
type Rep (Product a) |
Instance details Defined in Data.Semigroup.Internal type Rep (Product a) = D1 ('MetaData "Product" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Product" 'PrefixI 'True) (S1 ('MetaSel ('Just "getProduct") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 Product |
Instance details Defined in Data.Semigroup.Internal type Rep1 Product = D1 ('MetaData "Product" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Product" 'PrefixI 'True) (S1 ('MetaSel ('Just "getProduct") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

# A better monoid for Maybe

newtype Option a #

Constructors

Option |

Fields

- getOption :: Maybe a

#### Instances

Instances details

Monad Option |
Instance details Defined in Data.Semigroup Methods (>>=) :: Option a -> (a -> Option b) -> Option b # (>>) :: Option a -> Option b -> Option b # return :: a -> Option a #
Functor Option |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Option a -> Option b # (<$) :: a -> Option b -> Option a #
MonadFix Option |
Instance details Defined in Data.Semigroup Methods mfix :: (a -> Option a) -> Option a
Applicative Option |
Instance details Defined in Data.Semigroup Methods pure :: a -> Option a (<*>) :: Option (a -> b) -> Option a -> Option b liftA2 :: (a -> b -> c) -> Option a -> Option b -> Option c (*>) :: Option a -> Option b -> Option b (<*) :: Option a -> Option b -> Option a
Foldable Option |

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Option m -> m

foldMap :: Monoid m => (a -> m) -> Option a -> m

foldMap' :: Monoid m => (a -> m) -> Option a -> m

foldr :: (a -> b -> b) -> b -> Option a -> b

foldr' :: (a -> b -> b) -> b -> Option a -> b

foldl :: (b -> a -> b) -> b -> Option a -> b

foldl' :: (b -> a -> b) -> b -> Option a -> b

foldr1 :: (a -> a -> a) -> Option a -> a

foldl1 :: (a -> a -> a) -> Option a -> a

toList :: Option a -> [a]

null :: Option a -> Bool

length :: Option a -> Int

elem :: Eq a => a -> Option a -> Bool

maximum :: Ord a => Option a -> a

minimum :: Ord a => Option a -> a

sum :: Num a => Option a -> a

product :: Num a => Option a -> a

Traversable Option |
Instance details Defined in Data.Semigroup Methods traverse :: Applicative f => (a -> f b) -> Option a -> f (Option b) sequenceA :: Applicative f => Option (f a) -> f (Option a) mapM :: Monad m => (a -> m b) -> Option a -> m (Option b) # sequence :: Monad m => Option (m a) -> m (Option a) #
Alternative Option |
Instance details Defined in Data.Semigroup Methods empty :: Option a (<|>) :: Option a -> Option a -> Option a some :: Option a -> Option [a] many :: Option a -> Option [a]
MonadPlus Option |
Instance details Defined in Data.Semigroup Methods mzero :: Option a # mplus :: Option a -> Option a -> Option a #
Eq a => Eq (Option a) |
Instance details Defined in Data.Semigroup Methods (==) :: Option a -> Option a -> Bool (/=) :: Option a -> Option a -> Bool
Data a => Data (Option a) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Option a -> c (Option a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Option a)

toConstr :: Option a -> Constr

dataTypeOf :: Option a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Option a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Option a))

gmapT :: (forall b. Data b => b -> b) -> Option a -> Option a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Option a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Option a -> r

gmapQ :: (forall d. Data d => d -> u) -> Option a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Option a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Option a -> m (Option a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Option a -> m (Option a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Option a -> m (Option a)

Ord a => Ord (Option a) |
Instance details Defined in Data.Semigroup Methods compare :: Option a -> Option a -> Ordering (<) :: Option a -> Option a -> Bool (<=) :: Option a -> Option a -> Bool (>) :: Option a -> Option a -> Bool (>=) :: Option a -> Option a -> Bool max :: Option a -> Option a -> Option a min :: Option a -> Option a -> Option a
Read a => Read (Option a) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (Option a) # readList :: ReadS [Option a] # readPrec :: ReadPrec (Option a) # readListPrec :: ReadPrec [Option a] #
Show a => Show (Option a) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Option a -> ShowS show :: Option a -> String showList :: [Option a] -> ShowS
Generic (Option a) |
Instance details Defined in Data.Semigroup Associated Types type Rep (Option a) :: Type -> Type Methods from :: Option a -> Rep (Option a) x to :: Rep (Option a) x -> Option a
Semigroup a => Semigroup (Option a) |
Instance details Defined in Data.Semigroup Methods (<>) :: Option a -> Option a -> Option a # sconcat :: NonEmpty (Option a) -> Option a # stimes :: Integral b => b -> Option a -> Option a #
Semigroup a => Monoid (Option a) |
Instance details Defined in Data.Semigroup Methods mempty :: Option a # mappend :: Option a -> Option a -> Option a # mconcat :: [Option a] -> Option a #
Generic1 Option |
Instance details Defined in Data.Semigroup Associated Types type Rep1 Option :: k -> Type Methods from1 :: forall (a :: k). Option a -> Rep1 Option a to1 :: forall (a :: k). Rep1 Option a -> Option a
type Rep (Option a) |
Instance details Defined in Data.Semigroup type Rep (Option a) = D1 ('MetaData "Option" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Option" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))
type Rep1 Option |
Instance details Defined in Data.Semigroup type Rep1 Option = D1 ('MetaData "Option" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Option" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))

option :: b -> (a -> b) -> Option a -> b #

# Difference lists of a semigroup

diff :: Semigroup m => m -> Endo m #

cycle1 :: Semigroup m => m -> m #

# ArgMin, ArgMax

data Arg a b #

Constructors

Arg a b |

#### Instances

Instances details

Bifoldable Arg |
Instance details Defined in Data.Semigroup Methods bifold :: Monoid m => Arg m m -> m bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Arg a b -> m bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Arg a b -> c bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Arg a b -> c
Bifunctor Arg |
Instance details Defined in Data.Semigroup Methods bimap :: (a -> b) -> (c -> d) -> Arg a c -> Arg b d first :: (a -> b) -> Arg a c -> Arg b c second :: (b -> c) -> Arg a b -> Arg a c
Bitraversable Arg |
Instance details Defined in Data.Semigroup Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Arg a b -> f (Arg c d)
Functor (Arg a) |
Instance details Defined in Data.Semigroup Methods fmap :: (a0 -> b) -> Arg a a0 -> Arg a b # (<$) :: a0 -> Arg a b -> Arg a a0 #
Foldable (Arg a) |

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0

toList :: Arg a a0 -> [a0]

null :: Arg a a0 -> Bool

length :: Arg a a0 -> Int

elem :: Eq a0 => a0 -> Arg a a0 -> Bool

maximum :: Ord a0 => Arg a a0 -> a0

minimum :: Ord a0 => Arg a a0 -> a0

sum :: Num a0 => Arg a a0 -> a0

product :: Num a0 => Arg a a0 -> a0

Traversable (Arg a) |
Instance details Defined in Data.Semigroup Methods traverse :: Applicative f => (a0 -> f b) -> Arg a a0 -> f (Arg a b) sequenceA :: Applicative f => Arg a (f a0) -> f (Arg a a0) mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m (Arg a b) # sequence :: Monad m => Arg a (m a0) -> m (Arg a a0) #
Generic1 (Arg a :: Type -> Type) |
Instance details Defined in Data.Semigroup Associated Types type Rep1 (Arg a) :: k -> Type Methods from1 :: forall (a0 :: k). Arg a a0 -> Rep1 (Arg a) a0 to1 :: forall (a0 :: k). Rep1 (Arg a) a0 -> Arg a a0
Eq a => Eq (Arg a b) |
Instance details Defined in Data.Semigroup Methods (==) :: Arg a b -> Arg a b -> Bool (/=) :: Arg a b -> Arg a b -> Bool
(Data a, Data b) => Data (Arg a b) |

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Arg a b -> c (Arg a b)

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arg a b)

toConstr :: Arg a b -> Constr

dataTypeOf :: Arg a b -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Arg a b))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arg a b))

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Arg a b -> Arg a b

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arg a b -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arg a b -> r

gmapQ :: (forall d. Data d => d -> u) -> Arg a b -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Arg a b -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b)

Ord a => Ord (Arg a b) |
Instance details Defined in Data.Semigroup Methods compare :: Arg a b -> Arg a b -> Ordering (<) :: Arg a b -> Arg a b -> Bool (<=) :: Arg a b -> Arg a b -> Bool (>) :: Arg a b -> Arg a b -> Bool (>=) :: Arg a b -> Arg a b -> Bool max :: Arg a b -> Arg a b -> Arg a b min :: Arg a b -> Arg a b -> Arg a b
(Read a, Read b) => Read (Arg a b) |
Instance details Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (Arg a b) # readList :: ReadS [Arg a b] # readPrec :: ReadPrec (Arg a b) # readListPrec :: ReadPrec [Arg a b] #
(Show a, Show b) => Show (Arg a b) |
Instance details Defined in Data.Semigroup Methods showsPrec :: Int -> Arg a b -> ShowS show :: Arg a b -> String showList :: [Arg a b] -> ShowS
Generic (Arg a b) |
Instance details Defined in Data.Semigroup Associated Types type Rep (Arg a b) :: Type -> Type Methods from :: Arg a b -> Rep (Arg a b) x to :: Rep (Arg a b) x -> Arg a b
type Rep1 (Arg a :: Type -> Type) |
Instance details Defined in Data.Semigroup type Rep1 (Arg a :: Type -> Type) = D1 ('MetaData "Arg" "Data.Semigroup" "base" 'False) (C1 ('MetaCons "Arg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (Arg a b) |
Instance details Defined in Data.Semigroup type Rep (Arg a b) = D1 ('MetaData "Arg" "Data.Semigroup" "base" 'False) (C1 ('MetaCons "Arg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))

type ArgMin a b = Min (Arg a b) #

type ArgMax a b = Max (Arg a b) #