alg-0.2.13.1: Algebraic structures

Safe HaskellSafe
LanguageHaskell2010

Algebra

Synopsis

Documentation

class Semigroup a where Source #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the associativity law:

Since: base-4.9.0.0

Minimal complete definition

(<>)

Methods

(<>) :: a -> a -> a infixr 6 Source #

An associative operation.

sconcat :: NonEmpty a -> a Source #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

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

Repeat a value n times.

Given that this works on a Semigroup it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so.

By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in O(1) by picking stimes = stimesIdempotent or stimes = stimesIdempotentMonoid respectively.

Instances
Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: () -> () -> () Source #

sconcat :: NonEmpty () -> () Source #

stimes :: Integral b => b -> () -> () Source #

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All Source #

sconcat :: NonEmpty All -> All Source #

stimes :: Integral b => b -> All -> All Source #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any Source #

sconcat :: NonEmpty Any -> Any Source #

stimes :: Integral b => b -> Any -> Any Source #

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: [a] -> [a] -> [a] Source #

sconcat :: NonEmpty [a] -> [a] Source #

stimes :: Integral b => b -> [a] -> [a] Source #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty (Maybe a) -> Maybe a Source #

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

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty (IO a) -> IO a Source #

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

Semigroup p => Semigroup (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Par1 p -> Par1 p -> Par1 p Source #

sconcat :: NonEmpty (Par1 p) -> Par1 p Source #

stimes :: Integral b => b -> Par1 p -> Par1 p Source #

Ord a => Semigroup (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

sconcat :: NonEmpty (Min a) -> Min a Source #

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

Ord a => Semigroup (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

sconcat :: NonEmpty (Max a) -> Max a Source #

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

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

sconcat :: NonEmpty (First a) -> First a Source #

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

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

sconcat :: NonEmpty (Last a) -> Last a Source #

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

Monoid m => Semigroup (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

sconcat :: NonEmpty (Option a) -> Option a Source #

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

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

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

sconcat :: NonEmpty (First a) -> First a Source #

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

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

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

sconcat :: NonEmpty (Last a) -> Last a Source #

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

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

sconcat :: NonEmpty (Dual a) -> Dual a Source #

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

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

sconcat :: NonEmpty (Endo a) -> Endo a Source #

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

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

sconcat :: NonEmpty (Sum a) -> Sum a Source #

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

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

sconcat :: NonEmpty (Product a) -> Product a Source #

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

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

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

sconcat :: NonEmpty (Down a) -> Down a Source #

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

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Ord a => Semigroup (Min a) Source # 
Instance details

Defined in Relation.Binary.Comparison

Methods

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

sconcat :: NonEmpty (Min a) -> Min a Source #

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

Bits a => Semigroup (Min (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Methods

(<>) :: Min (BitSet a) -> Min (BitSet a) -> Min (BitSet a) Source #

sconcat :: NonEmpty (Min (BitSet a)) -> Min (BitSet a) Source #

stimes :: Integral b => b -> Min (BitSet a) -> Min (BitSet a) Source #

Ord a => Semigroup (Max a) Source # 
Instance details

Defined in Relation.Binary.Comparison

Methods

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

sconcat :: NonEmpty (Max a) -> Max a Source #

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

Bits a => Semigroup (Max (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Methods

(<>) :: Max (BitSet a) -> Max (BitSet a) -> Max (BitSet a) Source #

sconcat :: NonEmpty (Max (BitSet a)) -> Max (BitSet a) Source #

stimes :: Integral b => b -> Max (BitSet a) -> Max (BitSet a) Source #

Semigroup a => Semigroup (Lexical a) Source # 
Instance details

Defined in Relation.Binary.Comparison

Methods

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

sconcat :: NonEmpty (Lexical a) -> Lexical a Source #

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

Bits a => Semigroup (BitSet a) Source # 
Instance details

Defined in Data.BitSet

Methods

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

sconcat :: NonEmpty (BitSet a) -> BitSet a Source #

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

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty (a -> b) -> a -> b Source #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b Source #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b Source #

sconcat :: NonEmpty (Either a b) -> Either a b Source #

stimes :: Integral b0 => b0 -> Either a b -> Either a b Source #

Semigroup (V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: V1 p -> V1 p -> V1 p Source #

sconcat :: NonEmpty (V1 p) -> V1 p Source #

stimes :: Integral b => b -> V1 p -> V1 p Source #

Semigroup (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: U1 p -> U1 p -> U1 p Source #

sconcat :: NonEmpty (U1 p) -> U1 p Source #

stimes :: Integral b => b -> U1 p -> U1 p Source #

(Semigroup a, Semigroup b) => Semigroup (a, b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) Source #

sconcat :: NonEmpty (a, b) -> (a, b) Source #

stimes :: Integral b0 => b0 -> (a, b) -> (a, b) Source #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s Source #

sconcat :: NonEmpty (Proxy s) -> Proxy s Source #

stimes :: Integral b => b -> Proxy s -> Proxy s Source #

(Applicative p, Semigroup a) => Semigroup (Ap p a) 
Instance details

Defined in Util

Methods

(<>) :: Ap p a -> Ap p a -> Ap p a Source #

sconcat :: NonEmpty (Ap p a) -> Ap p a Source #

stimes :: Integral b => b -> Ap p a -> Ap p a Source #

Semigroup (f p) => Semigroup (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #

sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p Source #

stimes :: Integral b => b -> Rec1 f p -> Rec1 f p Source #

(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) Source #

stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) Source #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b Source #

sconcat :: NonEmpty (Const a b) -> Const a b Source #

stimes :: Integral b0 => b0 -> Const a b -> Const a b Source #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a Source #

sconcat :: NonEmpty (Ap f a) -> Ap f a Source #

stimes :: Integral b => b -> Ap f a -> Ap f a Source #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Alt f a -> Alt f a -> Alt f a Source #

sconcat :: NonEmpty (Alt f a) -> Alt f a Source #

stimes :: Integral b => b -> Alt f a -> Alt f a Source #

Semigroup c => Semigroup (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: K1 i c p -> K1 i c p -> K1 i c p Source #

sconcat :: NonEmpty (K1 i c p) -> K1 i c p Source #

stimes :: Integral b => b -> K1 i c p -> K1 i c p Source #

(Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p Source #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p Source #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) Source #

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) Source #

Semigroup (f p) => Semigroup (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

sconcat :: NonEmpty (M1 i c f p) -> M1 i c f p Source #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p Source #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p Source #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p Source #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) Source #

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

Semigroup (k3 b a) => Semigroup (Dual k3 a b) 
Instance details

Defined in Control.Category.Dual

Methods

(<>) :: Dual k3 a b -> Dual k3 a b -> Dual k3 a b Source #

sconcat :: NonEmpty (Dual k3 a b) -> Dual k3 a b Source #

stimes :: Integral b0 => b0 -> Dual k3 a b -> Dual k3 a b Source #

class Semigroup a => Monoid a where Source #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws:

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product.

NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

Methods

mempty :: a Source #

Identity of mappend

Instances
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () Source #

mappend :: () -> () -> () Source #

mconcat :: [()] -> () Source #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] Source #

mappend :: [a] -> [a] -> [a] Source #

mconcat :: [[a]] -> [a] Source #

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a Source #

mappend :: Maybe a -> Maybe a -> Maybe a Source #

mconcat :: [Maybe a] -> Maybe a Source #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a Source #

mappend :: IO a -> IO a -> IO a Source #

mconcat :: [IO a] -> IO a Source #

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p Source #

mappend :: Par1 p -> Par1 p -> Par1 p Source #

mconcat :: [Par1 p] -> Par1 p Source #

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a Source #

mappend :: Min a -> Min a -> Min a Source #

mconcat :: [Min a] -> Min a Source #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a Source #

mappend :: Max a -> Max a -> Max a Source #

mconcat :: [Max a] -> Max a Source #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a Source #

mappend :: First a -> First a -> First a Source #

mconcat :: [First a] -> First a Source #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a Source #

mappend :: Last a -> Last a -> Last a Source #

mconcat :: [Last a] -> Last a Source #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a Source #

mappend :: Dual a -> Dual a -> Dual a Source #

mconcat :: [Dual a] -> Dual a Source #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a Source #

mappend :: Endo a -> Endo a -> Endo a Source #

mconcat :: [Endo a] -> Endo a Source #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a Source #

mappend :: Sum a -> Sum a -> Sum a Source #

mconcat :: [Sum a] -> Sum a Source #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a Source #

mappend :: Down a -> Down a -> Down a Source #

mconcat :: [Down a] -> Down a Source #

Bits a => Monoid (Min (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Methods

mempty :: Min (BitSet a) Source #

mappend :: Min (BitSet a) -> Min (BitSet a) -> Min (BitSet a) Source #

mconcat :: [Min (BitSet a)] -> Min (BitSet a) Source #

Bits a => Monoid (Max (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Methods

mempty :: Max (BitSet a) Source #

mappend :: Max (BitSet a) -> Max (BitSet a) -> Max (BitSet a) Source #

mconcat :: [Max (BitSet a)] -> Max (BitSet a) Source #

Monoid a => Monoid (Lexical a) Source # 
Instance details

Defined in Relation.Binary.Comparison

Bits a => Monoid (BitSet a) Source # 
Instance details

Defined in Data.BitSet

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b Source #

mappend :: (a -> b) -> (a -> b) -> a -> b Source #

mconcat :: [a -> b] -> a -> b Source #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p Source #

mappend :: U1 p -> U1 p -> U1 p Source #

mconcat :: [U1 p] -> U1 p Source #

(Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) Source #

mappend :: (a, b) -> (a, b) -> (a, b) Source #

mconcat :: [(a, b)] -> (a, b) Source #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s Source #

mappend :: Proxy s -> Proxy s -> Proxy s Source #

mconcat :: [Proxy s] -> Proxy s Source #

(Applicative p, Semigroup a, Monoid a) => Monoid (Ap p a) 
Instance details

Defined in Util

Methods

mempty :: Ap p a Source #

mappend :: Ap p a -> Ap p a -> Ap p a Source #

mconcat :: [Ap p a] -> Ap p a Source #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p Source #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #

mconcat :: [Rec1 f p] -> Rec1 f p Source #

(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) Source #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

mconcat :: [(a, b, c)] -> (a, b, c) Source #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b Source #

mappend :: Const a b -> Const a b -> Const a b Source #

mconcat :: [Const a b] -> Const a b Source #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a Source #

mappend :: Ap f a -> Ap f a -> Ap f a Source #

mconcat :: [Ap f a] -> Ap f a Source #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a Source #

mappend :: Alt f a -> Alt f a -> Alt f a Source #

mconcat :: [Alt f a] -> Alt f a Source #

Monoid c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: K1 i c p Source #

mappend :: K1 i c p -> K1 i c p -> K1 i c p Source #

mconcat :: [K1 i c p] -> K1 i c p Source #

(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p Source #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

mconcat :: [(f :*: g) p] -> (f :*: g) p Source #

(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d) Source #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) Source #

Monoid (f p) => Monoid (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p Source #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

mconcat :: [M1 i c f p] -> M1 i c f p Source #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p Source #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

mconcat :: [(f :.: g) p] -> (f :.: g) p Source #

(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d, e) Source #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) Source #

Monoid (k3 b a) => Monoid (Dual k3 a b) 
Instance details

Defined in Control.Category.Dual

Methods

mempty :: Dual k3 a b Source #

mappend :: Dual k3 a b -> Dual k3 a b -> Dual k3 a b Source #

mconcat :: [Dual k3 a b] -> Dual k3 a b Source #

class Monoid a => Group a where Source #

Methods

invert :: a -> a Source #

Instances
Group () Source # 
Instance details

Defined in Algebra

Methods

invert :: () -> () Source #

Group a => Group (Identity a) Source # 
Instance details

Defined in Algebra

Methods

invert :: Identity a -> Identity a Source #

Group a => Group (Dual a) Source # 
Instance details

Defined in Algebra

Methods

invert :: Dual a -> Dual a Source #

Num a => Group (Sum a) Source # 
Instance details

Defined in Algebra

Methods

invert :: Sum a -> Sum a Source #

Fractional a => Group (Product a) Source # 
Instance details

Defined in Algebra

Methods

invert :: Product a -> Product a Source #

Group a => Group (Lexical a) Source # 
Instance details

Defined in Relation.Binary.Comparison

Methods

invert :: Lexical a -> Lexical a Source #

Bits a => Group (BitSet a) Source # 
Instance details

Defined in Data.BitSet

Methods

invert :: BitSet a -> BitSet a Source #

Group b => Group (a -> b) Source # 
Instance details

Defined in Algebra

Methods

invert :: (a -> b) -> a -> b Source #

(Group a, Group b) => Group (a, b) Source # 
Instance details

Defined in Algebra

Methods

invert :: (a, b) -> (a, b) Source #

Group (Proxy a) Source # 
Instance details

Defined in Algebra

Methods

invert :: Proxy a -> Proxy a Source #

(Group a, Group b, Group c) => Group (a, b, c) Source # 
Instance details

Defined in Algebra

Methods

invert :: (a, b, c) -> (a, b, c) Source #

Group a => Group (Const a b) Source # 
Instance details

Defined in Algebra

Methods

invert :: Const a b -> Const a b Source #

(Group a, Group b, Group c, Group d) => Group (a, b, c, d) Source # 
Instance details

Defined in Algebra

Methods

invert :: (a, b, c, d) -> (a, b, c, d) Source #

(Group a, Group b, Group c, Group d, Group e) => Group (a, b, c, d, e) Source # 
Instance details

Defined in Algebra

Methods

invert :: (a, b, c, d, e) -> (a, b, c, d, e) Source #

Group (k3 b a) => Group (Dual k3 a b) Source # 
Instance details

Defined in Algebra

Methods

invert :: Dual k3 a b -> Dual k3 a b Source #

class Semigroup a => Abelian a Source #

Instances
Abelian () Source # 
Instance details

Defined in Algebra

Abelian All Source # 
Instance details

Defined in Algebra

Abelian Any Source # 
Instance details

Defined in Algebra

Abelian (Min Int) Source # 
Instance details

Defined in Algebra

Abelian (Min Integer) Source # 
Instance details

Defined in Algebra

Abelian (Min Natural) Source # 
Instance details

Defined in Algebra

Abelian (Min Word) Source # 
Instance details

Defined in Algebra

Abelian (Max Int) Source # 
Instance details

Defined in Algebra

Abelian (Max Integer) Source # 
Instance details

Defined in Algebra

Abelian (Max Natural) Source # 
Instance details

Defined in Algebra

Abelian (Max Word) Source # 
Instance details

Defined in Algebra

Abelian a => Abelian (Identity a) Source # 
Instance details

Defined in Algebra

Abelian a => Abelian (Dual a) Source # 
Instance details

Defined in Algebra

Abelian (Sum Int) Source # 
Instance details

Defined in Algebra

Abelian (Sum Integer) Source # 
Instance details

Defined in Algebra

Abelian (Sum Natural) Source # 
Instance details

Defined in Algebra

Abelian (Sum Word) Source # 
Instance details

Defined in Algebra

Abelian (Product Int) Source # 
Instance details

Defined in Algebra

Abelian (Product Integer) Source # 
Instance details

Defined in Algebra

Abelian (Product Natural) Source # 
Instance details

Defined in Algebra

Abelian (Product Word) Source # 
Instance details

Defined in Algebra

Bits a => Abelian (Min (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Bits a => Abelian (Max (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Bits a => Abelian (BitSet a) Source # 
Instance details

Defined in Data.BitSet

Abelian b => Abelian (a -> b) Source # 
Instance details

Defined in Algebra

(Abelian a, Abelian b) => Abelian (a, b) Source # 
Instance details

Defined in Algebra

Abelian (Proxy a) Source # 
Instance details

Defined in Algebra

(Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) Source # 
Instance details

Defined in Algebra

Abelian a => Abelian (Const a b) Source # 
Instance details

Defined in Algebra

(Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) Source # 
Instance details

Defined in Algebra

(Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) Source # 
Instance details

Defined in Algebra

class Semigroup a => Idempotent a Source #

Instances
Idempotent () Source # 
Instance details

Defined in Algebra

Ord a => Idempotent (Min a) Source # 
Instance details

Defined in Algebra

Ord a => Idempotent (Max a) Source # 
Instance details

Defined in Algebra

Idempotent a => Idempotent (Identity a) Source # 
Instance details

Defined in Algebra

Idempotent a => Idempotent (Dual a) Source # 
Instance details

Defined in Algebra

Bits a => Idempotent (Min (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Bits a => Idempotent (Max (BitSet a)) Source # 
Instance details

Defined in Data.BitSet

Idempotent b => Idempotent (a -> b) Source # 
Instance details

Defined in Algebra

(Idempotent a, Idempotent b) => Idempotent (a, b) Source # 
Instance details

Defined in Algebra

Idempotent (Proxy a) Source # 
Instance details

Defined in Algebra

(Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) Source # 
Instance details

Defined in Algebra

Idempotent a => Idempotent (Const a b) Source # 
Instance details

Defined in Algebra

(Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) Source # 
Instance details

Defined in Algebra

(Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) Source # 
Instance details

Defined in Algebra

(+) :: Semigroup (Sum a) => a -> a -> a infixl 6 Source #

(-) :: Group (Sum a) => a -> a -> a infixl 6 Source #

(*) :: Semigroup (Product a) => a -> a -> a infixl 7 Source #

(/) :: (Semigroup (Product a), Group (Product a)) => a -> a -> a infixl 7 Source #

(×) :: Semigroup (Product a) => a -> a -> a infixl 7 Source #

commuteWith :: Group b => (a -> a -> b) -> a -> a -> b Source #