Cabal-3.2.1.0: A framework for packaging Haskell software
Safe Haskell None
Language Haskell2010

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 following:

Associativity
x <> (y <> z) = (x <> y) <> z

Since: base-4.9.0.0

Methods

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

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

Instances

Instances details
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

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

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Internal

Semigroup Builder
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Semigroup ShortText Source #
Instance details

Defined in Distribution.Utils.ShortText

Semigroup CDialect Source #
Instance details

Defined in Distribution.Simple.CCompiler

Semigroup UnqualComponentName Source #
Instance details

Defined in Distribution.Types.UnqualComponentName

Semigroup LibraryVisibility Source #
Instance details

Defined in Distribution.Types.LibraryVisibility

Semigroup ForeignLibType Source #
Instance details

Defined in Distribution.Types.ForeignLibType

Semigroup FlagAssignment Source #
Instance details

Defined in Distribution.Types.Flag

Semigroup ExecutableScope Source #

Any like semigroup, where ExecutablePrivate is 'Any True'

Instance details

Defined in Distribution.Types.ExecutableScope

Semigroup TestSuiteInterface Source #
Instance details

Defined in Distribution.Types.TestSuiteInterface

Semigroup SetupBuildInfo Source #
Instance details

Defined in Distribution.Types.SetupBuildInfo

Semigroup DependencyMap Source #
Instance details

Defined in Distribution.Types.DependencyMap

Semigroup BenchmarkInterface Source #
Instance details

Defined in Distribution.Types.BenchmarkInterface

Semigroup BuildInfo Source #
Instance details

Defined in Distribution.Types.BuildInfo

Semigroup TestSuite Source #
Instance details

Defined in Distribution.Types.TestSuite

Semigroup Library Source #
Instance details

Defined in Distribution.Types.Library

Semigroup ForeignLib Source #
Instance details

Defined in Distribution.Types.ForeignLib

Semigroup Executable Source #
Instance details

Defined in Distribution.Types.Executable

Semigroup Benchmark Source #
Instance details

Defined in Distribution.Types.Benchmark

Semigroup Component Source #
Instance details

Defined in Distribution.Types.Component

Semigroup GhcOptions Source #
Instance details

Defined in Distribution.Simple.Program.GHC

Semigroup BenchmarkFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup TestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup GlobalFlags Source #
Instance details

Defined in Distribution.Simple.Setup

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

Semigroup a => Semigroup ( IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Semigroup p => Semigroup ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Ord a => Semigroup ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Semigroup ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

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

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

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup a => Semigroup ( Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ( Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup a => Semigroup ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Semigroup ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ( PutM ())
Instance details

Defined in Data.Binary.Put

Semigroup ( IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Semigroup ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Ord a => Semigroup ( Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Semigroup ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

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 a => Semigroup ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Semigroup ( Last' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Semigroup ( First' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Semigroup ( Condition a) Source #
Instance details

Defined in Distribution.Types.Condition

Semigroup ( Flag a) Source #
Instance details

Defined in Distribution.Simple.Flag

Semigroup ( DList a) Source #
Instance details

Defined in Distribution.Compat.DList

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

Defined in Distribution.Compiler

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

Defined in Distribution.Simple.InstallDirs

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

Defined in Distribution.Utils.NubList

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

Defined in Distribution.Utils.NubList

Semigroup ( PackageIndex InstalledPackageInfo ) Source #
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

Semigroup ( V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( 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

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Map.Internal

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

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( 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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Semigroup ( Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup c => Semigroup ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

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

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 #

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:

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z ( Semigroup law)
Concatenation
mconcat = foldr ( <> ) mempty

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 newtype s 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

>>> "Hello world" <> mempty
"Hello world"

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 . Should it be implemented manually, since mappend is a synonym for ( <> ), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid .

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.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"

Instances

Instances details
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

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

Defined in Data.ByteString.Short.Internal

Monoid ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ByteString
Instance details

Defined in Data.ByteString.Internal

Monoid Builder
Instance details

Defined in Data.ByteString.Builder.Internal

Monoid IntSet
Instance details

Defined in Data.IntSet.Internal

Monoid Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Monoid ShortText Source #
Instance details

Defined in Distribution.Utils.ShortText

Monoid CDialect Source #
Instance details

Defined in Distribution.Simple.CCompiler

Monoid UnqualComponentName Source #
Instance details

Defined in Distribution.Types.UnqualComponentName

Monoid LibraryVisibility Source #
Instance details

Defined in Distribution.Types.LibraryVisibility

Monoid ForeignLibType Source #
Instance details

Defined in Distribution.Types.ForeignLibType

Monoid FlagAssignment Source #
Instance details

Defined in Distribution.Types.Flag

Monoid ExecutableScope Source #

mempty = ExecutablePublic

Instance details

Defined in Distribution.Types.ExecutableScope

Monoid TestSuiteInterface Source #
Instance details

Defined in Distribution.Types.TestSuiteInterface

Monoid SetupBuildInfo Source #
Instance details

Defined in Distribution.Types.SetupBuildInfo

Monoid DependencyMap Source #
Instance details

Defined in Distribution.Types.DependencyMap

Monoid BenchmarkInterface Source #
Instance details

Defined in Distribution.Types.BenchmarkInterface

Monoid BuildInfo Source #
Instance details

Defined in Distribution.Types.BuildInfo

Monoid TestSuite Source #
Instance details

Defined in Distribution.Types.TestSuite

Monoid Library Source #

This instance is not good.

We need it for addBuildableCondition . More correct method would be some kind of "create empty clone".

More concretely, addBuildableCondition will make `libVisibility = False` libraries when `buildable: false`. This may cause problems.

Instance details

Defined in Distribution.Types.Library

Monoid ForeignLib Source #
Instance details

Defined in Distribution.Types.ForeignLib

Monoid Executable Source #
Instance details

Defined in Distribution.Types.Executable

Monoid Benchmark Source #
Instance details

Defined in Distribution.Types.Benchmark

Monoid GhcOptions Source #
Instance details

Defined in Distribution.Simple.Program.GHC

Monoid BenchmarkFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid TestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid GlobalFlags Source #
Instance details

Defined in Distribution.Simple.Setup

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

Monoid a => Monoid ( IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid p => Monoid ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

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

Monoid ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Monoid a => Monoid ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid ( Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

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

Monoid ( PutM ())
Instance details

Defined in Data.Binary.Put

Monoid ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Monoid ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Monoid ( Set a)
Instance details

Defined in Data.Set.Internal

Monoid ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

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 #

Semigroup a => Monoid ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Monoid ( Condition a) Source #
Instance details

Defined in Distribution.Types.Condition

Monoid ( Flag a) Source #
Instance details

Defined in Distribution.Simple.Flag

Monoid ( DList a) Source #
Instance details

Defined in Distribution.Compat.DList

( Semigroup a, Monoid a) => Monoid ( PerCompilerFlavor a) Source #
Instance details

Defined in Distribution.Compiler

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

Defined in Distribution.Simple.InstallDirs

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

Defined in Distribution.Utils.NubList

Ord a => Monoid ( NubList a) Source #

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 ( PackageIndex InstalledPackageInfo ) Source #
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 ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( 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

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Map.Internal

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

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( 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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Monoid ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid c => Monoid ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

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

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 #

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

Instances

Instances details
Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

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 :: forall r r'. (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

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic All

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type Source #

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Binary All

Since: binary-0.8.4.0

Instance details

Defined in Data.Binary.Class

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () Source #

type Rep All
Instance details

Defined in Data.Semigroup.Internal

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

Instances

Instances details
Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

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 :: forall r r'. (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

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type Source #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Binary Any

Since: binary-0.8.4.0

Instance details

Defined in Data.Binary.Class

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () Source #

type Rep Any
Instance details

Defined in Data.Semigroup.Internal

newtype Last' a Source #

A copy of Last .

Constructors

Last'

Fields

Instances

Instances details
Functor Last' Source #
Instance details

Defined in Distribution.Compat.Semigroup

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

Defined in Distribution.Compat.Semigroup

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

Defined in Distribution.Compat.Semigroup

Read a => Read ( Last' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

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

Defined in Distribution.Compat.Semigroup

Generic ( Last' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Associated Types

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

Semigroup ( Last' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

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

Defined in Distribution.Compat.Semigroup

Structured a => Structured ( Last' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

type Rep ( Last' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

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

newtype Option' a Source #

A wrapper around Maybe , providing the Semigroup and Monoid instances implemented for Maybe since base-4.11 .

Constructors

Option'

Instances

Instances details
Functor Option' Source #
Instance details

Defined in Distribution.Compat.Semigroup

Eq a => Eq ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Ord a => Ord ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Read a => Read ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Show a => Show ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Generic ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Associated Types

type Rep ( Option' a) :: Type -> Type Source #

Semigroup a => Semigroup ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Semigroup a => Monoid ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Binary a => Binary ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

Structured a => Structured ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

type Rep ( Option' a) Source #
Instance details

Defined in Distribution.Compat.Semigroup

type Rep ( Option' a) = D1 (' MetaData "Option'" "Distribution.Compat.Semigroup" "Cabal-3.2.1.0-3w1fQQbNnuQ5xlFGwVXcPy" ' True ) ( C1 (' MetaCons "Option'" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getOption'") ' 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