Cabal-2.2.0.1: A framework for packaging Haskell software

Safe HaskellNone
LanguageHaskell2010

Distribution.Compat.Semigroup

Description

Compatibility layer for Data.Semigroup

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.

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 Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

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 Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

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

sconcat :: NonEmpty Doc -> Doc Source #

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

Semigroup CDialect # 
Instance details

Defined in Distribution.Simple.CCompiler

Semigroup ShortText # 
Instance details

Defined in Distribution.Utils.ShortText

Semigroup ForeignLibType # 
Instance details

Defined in Distribution.Types.ForeignLibType

Semigroup ExecutableScope #

Any like semigroup, where ExecutablePrivate is 'Any True'

Instance details

Defined in Distribution.Types.ExecutableScope

Semigroup TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Semigroup BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Semigroup UnqualComponentName # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Semigroup SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Semigroup DependencyMap # 
Instance details

Defined in Distribution.Types.DependencyMap

Semigroup BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Semigroup TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Semigroup Library # 
Instance details

Defined in Distribution.Types.Library

Semigroup ForeignLib # 
Instance details

Defined in Distribution.Types.ForeignLib

Semigroup Executable # 
Instance details

Defined in Distribution.Types.Executable

Semigroup Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Semigroup Component # 
Instance details

Defined in Distribution.Types.Component

Semigroup FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Semigroup BenchmarkFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup TestFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup TestShowDetails # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup ReplFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup BuildFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup CleanFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup HaddockFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup DoctestFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup HscolourFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup RegisterFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup SDistFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup InstallFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup CopyFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup ConfigFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup GlobalFlags # 
Instance details

Defined in Distribution.Simple.Setup

Semigroup GhcOptions # 
Instance details

Defined in Distribution.Simple.Program.GHC

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 #

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) 
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

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

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

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

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

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

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

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

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

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

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

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

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

Semigroup (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

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

Semigroup (PutM ()) 
Instance details

Defined in Data.Binary.Put

Methods

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

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

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

Semigroup (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

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

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

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

Semigroup (Last' a) # 
Instance details

Defined in Distribution.Compat.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 #

Semigroup (DList a) # 
Instance details

Defined in Distribution.Compat.DList

Methods

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

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

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

Semigroup (Condition a) # 
Instance details

Defined in Distribution.Types.Condition

Semigroup dir => Semigroup (InstallDirs dir) # 
Instance details

Defined in Distribution.Simple.InstallDirs

Ord a => Semigroup (NubListR a) # 
Instance details

Defined in Distribution.Utils.NubList

Ord a => Semigroup (NubList a) # 
Instance details

Defined in Distribution.Utils.NubList

Methods

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

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

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

Semigroup (Flag a) # 
Instance details

Defined in Distribution.Simple.Setup

Methods

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

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

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

Semigroup (PackageIndex InstalledPackageInfo) # 
Instance details

Defined in Distribution.Simple.PackageIndex

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 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 a => Semigroup (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

(<>) :: ST s a -> ST s a -> ST s a Source #

sconcat :: NonEmpty (ST s a) -> ST s a Source #

stimes :: Integral b => b -> ST s a -> ST s a 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 #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v Source #

sconcat :: NonEmpty (Map k v) -> Map k v Source #

stimes :: Integral b => b -> Map k v -> Map k v 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) 
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 #

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 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 a => Semigroup (ParsecT s u m a)

The Semigroup instance for ParsecT is used to append the result of several parsers, for example:

(many $ char a) <> (many $ char b)

The above will parse a string like "aabbb" and return a successful parse result "aabbb". Compare against the below which will produce a result of "bbb" for the same input:

(many $ char a) >> (many $ char b)
(many $ char a) *> (many $ char b)

Since: parsec-3.1.12

Instance details

Defined in Text.Parsec.Prim

Methods

(<>) :: ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a Source #

sconcat :: NonEmpty (ParsecT s u m a) -> ParsecT s u m a Source #

stimes :: Integral b => b -> ParsecT s u m a -> ParsecT s u m a 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 #

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.

Minimal complete definition

mempty

Methods

mempty :: a Source #

Identity of mappend

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

An associative operation

NOTE: This method is redundant and has the default implementation mappend = '(<>)' since base-4.11.0.0.

mconcat :: [a] -> a Source #

Fold a list using the monoid.

For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

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 Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Monoid CDialect # 
Instance details

Defined in Distribution.Simple.CCompiler

Monoid ShortText # 
Instance details

Defined in Distribution.Utils.ShortText

Monoid ForeignLibType # 
Instance details

Defined in Distribution.Types.ForeignLibType

Monoid ExecutableScope #

mempty = ExecutablePublic

Instance details

Defined in Distribution.Types.ExecutableScope

Monoid TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Monoid BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Monoid UnqualComponentName # 
Instance details

Defined in Distribution.Types.UnqualComponentName

Monoid SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Monoid DependencyMap # 
Instance details

Defined in Distribution.Types.DependencyMap

Monoid BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Monoid TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Monoid Library # 
Instance details

Defined in Distribution.Types.Library

Monoid ForeignLib # 
Instance details

Defined in Distribution.Types.ForeignLib

Monoid Executable # 
Instance details

Defined in Distribution.Types.Executable

Monoid Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Monoid FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Monoid BenchmarkFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid TestFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid TestShowDetails # 
Instance details

Defined in Distribution.Simple.Setup

Monoid ReplFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid BuildFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid CleanFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid HaddockFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid DoctestFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid HscolourFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid RegisterFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid SDistFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid InstallFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid CopyFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid ConfigFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid GlobalFlags # 
Instance details

Defined in Distribution.Simple.Setup

Monoid GhcOptions # 
Instance details

Defined in Distribution.Simple.Program.GHC

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 #

(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) 
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 #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a Source #

mappend :: Seq a -> Seq a -> Seq a Source #

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

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a Source #

mappend :: Set a -> Set a -> Set a Source #

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

Monoid (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a Source #

mappend :: Doc a -> Doc a -> Doc a Source #

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

Monoid (PutM ()) 
Instance details

Defined in Data.Binary.Put

Methods

mempty :: PutM () Source #

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

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

Monoid (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a Source #

mappend :: MergeSet a -> MergeSet a -> MergeSet a Source #

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

Monoid (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

Methods

mempty :: Last' a Source #

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

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

Monoid (DList a) # 
Instance details

Defined in Distribution.Compat.DList

Methods

mempty :: DList a Source #

mappend :: DList a -> DList a -> DList a Source #

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

Monoid (Condition a) # 
Instance details

Defined in Distribution.Types.Condition

(Semigroup dir, Monoid dir) => Monoid (InstallDirs dir) # 
Instance details

Defined in Distribution.Simple.InstallDirs

Ord a => Monoid (NubListR a) # 
Instance details

Defined in Distribution.Utils.NubList

Ord a => Monoid (NubList a) #

Monoid operations on NubLists. For a valid Monoid instance we need to satistfy the required monoid laws; identity, associativity and closure.

Identity : by inspection: mempty mappend NubList xs == NubList xs mappend mempty

Associativity : by inspection: (NubList xs mappend NubList ys) mappend NubList zs == NubList xs mappend (NubList ys mappend NubList zs)

Closure : appending two lists of type a and removing duplicates obviously does not change the type.

Instance details

Defined in Distribution.Utils.NubList

Monoid (Flag a) # 
Instance details

Defined in Distribution.Simple.Setup

Methods

mempty :: Flag a Source #

mappend :: Flag a -> Flag a -> Flag a Source #

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

Monoid (PackageIndex InstalledPackageInfo) # 
Instance details

Defined in Distribution.Simple.PackageIndex

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 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 a => Monoid (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

mempty :: ST s a Source #

mappend :: ST s a -> ST s a -> ST s a Source #

mconcat :: [ST s a] -> ST s a 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 #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v Source #

mappend :: Map k v -> Map k v -> Map k v Source #

mconcat :: [Map k v] -> Map k v 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) 
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 #

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 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 a, Semigroup (ParsecT s u m a)) => Monoid (ParsecT s u m a)

The Monoid instance for ParsecT is used for the same purposes as the Semigroup instance.

Since: parsec-3.1.12

Instance details

Defined in Text.Parsec.Prim

Methods

mempty :: ParsecT s u m a Source #

mappend :: ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a Source #

mconcat :: [ParsecT s u m a] -> ParsecT s u m a 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 #

newtype All Source #

Boolean monoid under conjunction (&&).

>>> getAll (All True <> mempty <> All False)
False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))
False

Constructors

All 

Fields

Instances
Bounded All 
Instance details

Defined in Data.Semigroup.Internal

Eq All 
Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: All -> All -> Bool #

(/=) :: All -> All -> Bool #

Data All

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> All -> c All Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c All Source #

toConstr :: All -> Constr Source #

dataTypeOf :: All -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c All) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c All) Source #

gmapT :: (forall b. Data b => b -> b) -> All -> All Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> All -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> All -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> All -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> All -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> All -> m All Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All Source #

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

Show All 
Instance details

Defined in Data.Semigroup.Internal

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: * -> * Source #

Methods

from :: All -> Rep All x Source #

to :: Rep All x -> All 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 #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () Source #

Binary All

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: All -> Put Source #

get :: Get All Source #

putList :: [All] -> Put Source #

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 Source #

Boolean monoid under disjunction (||).

>>> getAny (Any True <> mempty <> Any False)
True
>>> getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))
True

Constructors

Any 

Fields

Instances
Bounded Any 
Instance details

Defined in Data.Semigroup.Internal

Eq Any 
Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Any -> Any -> Bool #

(/=) :: Any -> Any -> Bool #

Data Any

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Any -> c Any Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Any Source #

toConstr :: Any -> Constr Source #

dataTypeOf :: Any -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Any) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Any) Source #

gmapT :: (forall b. Data b => b -> b) -> Any -> Any Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Any -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Any -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Any -> m Any Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any Source #

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

Show Any 
Instance details

Defined in Data.Semigroup.Internal

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: * -> * Source #

Methods

from :: Any -> Rep Any x Source #

to :: Rep Any x -> Any 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 #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () Source #

Binary Any

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Any -> Put Source #

get :: Get Any Source #

putList :: [Any] -> Put Source #

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 Last' a Source #

Cabal's own Last copy to avoid requiring an orphan Binary instance.

Once the oldest binary version we support provides a Binary instance for Last we can remove this one here.

NB: Last is defined differently and not a Monoid

Constructors

Last' 

Fields

Instances
Functor Last' # 
Instance details

Defined in Distribution.Compat.Semigroup

Methods

fmap :: (a -> b) -> Last' a -> Last' b Source #

(<$) :: a -> Last' b -> Last' a Source #

Applicative Last' # 
Instance details

Defined in Distribution.Compat.Semigroup

Methods

pure :: a -> Last' a Source #

(<*>) :: Last' (a -> b) -> Last' a -> Last' b Source #

liftA2 :: (a -> b -> c) -> Last' a -> Last' b -> Last' c Source #

(*>) :: Last' a -> Last' b -> Last' b Source #

(<*) :: Last' a -> Last' b -> Last' a Source #

Eq a => Eq (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

Methods

(==) :: Last' a -> Last' a -> Bool #

(/=) :: Last' a -> Last' a -> Bool #

Ord a => Ord (Last' a) # 
Instance details

Defined in Distribution.Compat.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 Distribution.Compat.Semigroup

Show a => Show (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

Generic (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

Associated Types

type Rep (Last' a) :: * -> * Source #

Methods

from :: Last' a -> Rep (Last' a) x Source #

to :: Rep (Last' a) x -> Last' a Source #

Semigroup (Last' a) # 
Instance details

Defined in Distribution.Compat.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 (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

Methods

mempty :: Last' a Source #

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

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

Binary a => Binary (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

Methods

put :: Last' a -> Put Source #

get :: Get (Last' a) Source #

putList :: [Last' a] -> Put Source #

type Rep (Last' a) # 
Instance details

Defined in Distribution.Compat.Semigroup

type Rep (Last' a) = D1 (MetaData "Last'" "Distribution.Compat.Semigroup" "Cabal-2.2.0.1" True) (C1 (MetaCons "Last'" PrefixI True) (S1 (MetaSel (Just "getLast'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe a))))

gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a Source #

Generically generate a Semigroup (<>) operation for any type implementing Generic. This operation will append two values by point-wise appending their component fields. It is only defined for product types.

gmappend a (gmappend b c) = gmappend (gmappend a b) c

gmempty :: (Generic a, GMonoid (Rep a)) => a Source #

Generically generate a Monoid mempty for any product-like type implementing Generic.

It is only defined for product types.

gmappend gmempty a = a = gmappend a gmempty