Module Data.Monoid

This module deals with Semigroups and Monoids

Imports

Table of Content

Definitions

class Semigroup this

Known Instances

Last, (), First, ->, ST, StringJ, Maybe, Ordering, []

Member Functions

mappendSemigroup this ⇒ this → this → this
infixr  13
sconcatSemigroup this ⇒ [this] → this
stimesSemigroup this ⇒ Int → this → this
class Semigroup this ⇒ Monoid this

Known Instances

Last, (), First, ->, ST, StringJ, Maybe, Ordering, []

Member Functions

mconcatMonoid this ⇒ [this] → this
memptyMonoid this ⇒ this
mtimesMonoid this ⇒ Int → this → this
data First a

Constructors

First {getFirst ∷ Maybe a}

Member Functions

getFirstFirst 𝖆Maybe 𝖆

access field getFirst

data Last a

Constructors

Last {getLast ∷ Maybe a}

Member Functions

getLastLast 𝖆Maybe 𝖆

access field getLast

Instances

instance Eq a ⇒ Eq (First a)

Member Functions

!=Eq 𝖆 ⇒ First 𝖆First 𝖆Bool
infix  7

inherited from Eq.!=

==Eq 𝖆 ⇒ First 𝖆First 𝖆Bool
infix  7

Function generated for derived instance.

hashCodeEq 𝖆 ⇒ First 𝖆Int

Function generated for derived instance.

instance Eq a ⇒ Eq (Last a)

Member Functions

!=Eq 𝖆 ⇒ Last 𝖆Last 𝖆Bool
infix  7

inherited from Eq.!=

==Eq 𝖆 ⇒ Last 𝖆Last 𝖆Bool
infix  7

Function generated for derived instance.

hashCodeEq 𝖆 ⇒ Last 𝖆Int

Function generated for derived instance.

instance Monoid ()

Member Functions

mappend()()()
infixr  13
mconcat[()]()

inherited from Monoid.mconcat

mempty()
mtimesInt()()

inherited from Monoid.mtimes

sconcat[()]()

inherited from Semigroup.sconcat

stimesInt()()

inherited from Semigroup.stimes

instance Monoid (a→a)

Member Functions

mappend ∷ (𝖆→𝖆) → (𝖆→𝖆) → 𝖆 → 𝖆
infixr  13
mconcat[𝖆→𝖆] → 𝖆 → 𝖆

inherited from Monoid.mconcat

mempty ∷ 𝖆 → 𝖆
mtimesInt → (𝖆→𝖆) → 𝖆 → 𝖆

inherited from Monoid.mtimes

sconcat[𝖆→𝖆] → 𝖆 → 𝖆

inherited from Semigroup.sconcat

stimesInt → (𝖆→𝖆) → 𝖆 → 𝖆

inherited from Semigroup.stimes

instance Monoid (First a)

Member Functions

mappendFirst 𝖆First 𝖆 → First 𝖆
infixr  13
mconcat[First 𝖆]First 𝖆

inherited from Monoid.mconcat

memptyFirst 𝖆
mtimesIntFirst 𝖆 → First 𝖆

inherited from Monoid.mtimes

sconcat[First 𝖆]First 𝖆

inherited from Semigroup.sconcat

stimesIntFirst 𝖆 → First 𝖆

inherited from Semigroup.stimes

instance Monoid a ⇒ Monoid (IO a)

Member Functions

mappendMonoid 𝖆 ⇒ IO 𝖆 → IO 𝖆 → IO 𝖆
infixr  13
mconcatMonoid 𝖆 ⇒ [IO 𝖆]IO 𝖆

inherited from Monoid.mconcat

memptyMonoid 𝖆 ⇒ IO 𝖆
mtimesMonoid 𝖆 ⇒ IntIO 𝖆 → IO 𝖆

inherited from Monoid.mtimes

sconcatMonoid 𝖆 ⇒ [IO 𝖆]IO 𝖆

inherited from Semigroup.sconcat

stimesMonoid 𝖆 ⇒ IntIO 𝖆 → IO 𝖆

inherited from Semigroup.stimes

instance Monoid (Last a)

Member Functions

mappendLast 𝖆 → Last 𝖆Last 𝖆
infixr  13
mconcat[Last 𝖆]Last 𝖆

inherited from Monoid.mconcat

memptyLast 𝖆
mtimesIntLast 𝖆 → Last 𝖆

inherited from Monoid.mtimes

sconcat[Last 𝖆]Last 𝖆

inherited from Semigroup.sconcat

stimesIntLast 𝖆 → Last 𝖆

inherited from Semigroup.stimes

instance Semigroup a ⇒ Monoid (Maybe a)

Member Functions

mappendSemigroup 𝖆 ⇒ Maybe 𝖆Maybe 𝖆 → Maybe 𝖆
infixr  13
mconcatSemigroup 𝖆 ⇒ [Maybe 𝖆]Maybe 𝖆

inherited from Monoid.mconcat

memptySemigroup 𝖆 ⇒ Maybe 𝖆
mtimesSemigroup 𝖆 ⇒ IntMaybe 𝖆 → Maybe 𝖆

inherited from Monoid.mtimes

sconcatSemigroup 𝖆 ⇒ [Maybe 𝖆]Maybe 𝖆

inherited from Semigroup.sconcat

stimesSemigroup 𝖆 ⇒ IntMaybe 𝖆 → Maybe 𝖆

inherited from Semigroup.stimes

instance Monoid Ordering

Member Functions

mappendOrderingOrderingOrdering
infixr  13
mconcat[Ordering]Ordering

inherited from Monoid.mconcat

memptyOrdering
mtimesIntOrderingOrdering

inherited from Monoid.mtimes

sconcat[Ordering]Ordering

inherited from Semigroup.sconcat

stimesIntOrderingOrdering

inherited from Semigroup.stimes

instance Monoid String

Member Functions

mappendStringStringString
infixr  13
mconcat[String]String

inherited from Monoid.mconcat

memptyString
mtimesIntStringString

inherited from Monoid.mtimes

sconcat[String]String

inherited from Semigroup.sconcat

stimesIntStringString

inherited from Semigroup.stimes

instance Monoid [a]

Member Functions

mappend ∷ [𝖆] → [𝖆] → [𝖆]
infixr  13
mconcat[[𝖆]] → [𝖆]

inherited from Monoid.mconcat

mempty ∷ [𝖆]
mtimesInt → [𝖆] → [𝖆]

inherited from Monoid.mtimes

sconcat[[𝖆]] → [𝖆]

inherited from Semigroup.sconcat

stimesInt → [𝖆] → [𝖆]

inherited from Semigroup.stimes

instance Ord a ⇒ Ord (First a)

Member Functions

<Ord 𝖆 ⇒ First 𝖆First 𝖆Bool
infix  9

inherited from Ord.<

<=Ord 𝖆 ⇒ First 𝖆First 𝖆Bool
infix  9

inherited from Ord.<=

<=>Ord 𝖆 ⇒ First 𝖆First 𝖆Ordering
infix  8

Function generated for derived instance.

>Ord 𝖆 ⇒ First 𝖆First 𝖆Bool
infix  9

inherited from Ord.>

>=Ord 𝖆 ⇒ First 𝖆First 𝖆Bool
infix  9

inherited from Ord.>=

compareOrd 𝖆 ⇒ First 𝖆First 𝖆Ordering
infix  8

inherited from Ord.compare

maxOrd 𝖆 ⇒ First 𝖆First 𝖆First 𝖆

inherited from Ord.max

minOrd 𝖆 ⇒ First 𝖆First 𝖆First 𝖆

inherited from Ord.min

instance Ord a ⇒ Ord (Last a)

Member Functions

<Ord 𝖆 ⇒ Last 𝖆Last 𝖆Bool
infix  9

inherited from Ord.<

<=Ord 𝖆 ⇒ Last 𝖆Last 𝖆Bool
infix  9

inherited from Ord.<=

<=>Ord 𝖆 ⇒ Last 𝖆Last 𝖆Ordering
infix  8

Function generated for derived instance.

>Ord 𝖆 ⇒ Last 𝖆Last 𝖆Bool
infix  9

inherited from Ord.>

>=Ord 𝖆 ⇒ Last 𝖆Last 𝖆Bool
infix  9

inherited from Ord.>=

compareOrd 𝖆 ⇒ Last 𝖆Last 𝖆Ordering
infix  8

inherited from Ord.compare

maxOrd 𝖆 ⇒ Last 𝖆Last 𝖆Last 𝖆

inherited from Ord.max

minOrd 𝖆 ⇒ Last 𝖆Last 𝖆Last 𝖆

inherited from Ord.min

instance Show a ⇒ Show (First a)

Member Functions

displayShow 𝖆 ⇒ First 𝖆String

inherited from Show.display

showShow 𝖆 ⇒ First 𝖆String

Function generated for derived instance.

showCharsShow 𝖆 ⇒ First 𝖆 → [Char]

inherited from Show.showChars

showListShow 𝖆 ⇒ [First 𝖆]StringString

inherited from Show.showList

showsPrecShow 𝖆 ⇒ IntFirst 𝖆StringString

inherited from Show.showsPrec

showsubShow 𝖆 ⇒ First 𝖆String

Function generated for derived instance.

instance Show a ⇒ Show (Last a)

Member Functions

displayShow 𝖆 ⇒ Last 𝖆String

inherited from Show.display

showShow 𝖆 ⇒ Last 𝖆String

Function generated for derived instance.

showCharsShow 𝖆 ⇒ Last 𝖆 → [Char]

inherited from Show.showChars

showListShow 𝖆 ⇒ [Last 𝖆]StringString

inherited from Show.showList

showsPrecShow 𝖆 ⇒ IntLast 𝖆StringString

inherited from Show.showsPrec

showsubShow 𝖆 ⇒ Last 𝖆String

Function generated for derived instance.

Functions and Values by Type

StringStringString

Monoid_String.mappend

[String] → String

Monoid_String.sconcat, Monoid_String.mconcat

[()] → ()

Monoid_().sconcat, Monoid_().mconcat

[Ordering] → Ordering

Monoid_Ordering.sconcat, Monoid_Ordering.mconcat

()()()

Monoid_().mappend

IntStringString

Monoid_String.stimes, Monoid_String.mtimes

Int()()

Monoid_().stimes, Monoid_().mtimes

IntOrderingOrdering

Monoid_Ordering.stimes, Monoid_Ordering.mtimes

OrderingOrderingOrdering

Monoid_Ordering.mappend

String

Monoid_String.mempty

()

Monoid_().mempty

Ordering

Monoid_Ordering.mempty

(𝖆→𝖆) → (𝖆→𝖆) → 𝖆 → 𝖆

Monoid_->.mappend

First 𝖆 → First 𝖆 → First 𝖆

Monoid_First.mappend

First 𝖆 → Maybe 𝖆

First.getFirst

Last 𝖆 → Last 𝖆 → Last 𝖆

Monoid_Last.mappend

Last 𝖆 → Maybe 𝖆

Last.getLast

Maybe a → First a

First.First

Maybe a → Last a

Last.Last

[𝖆→𝖆] → 𝖆 → 𝖆

Monoid_->.sconcat, Monoid_->.mconcat

[First 𝖆] → First 𝖆

Monoid_First.sconcat, Monoid_First.mconcat

[Last 𝖆] → Last 𝖆

Monoid_Last.sconcat, Monoid_Last.mconcat

[[𝖆]] → [𝖆]

Monoid_[].sconcat, Monoid_[].mconcat

[𝖆] → [𝖆] → [𝖆]

Monoid_[].mappend

Int → (𝖆→𝖆) → 𝖆 → 𝖆

Monoid_->.stimes, Monoid_->.mtimes

IntFirst 𝖆 → First 𝖆

Monoid_First.stimes, Monoid_First.mtimes

IntLast 𝖆 → Last 𝖆

Monoid_Last.stimes, Monoid_Last.mtimes

Int → [𝖆] → [𝖆]

Monoid_[].stimes, Monoid_[].mtimes

𝖆 → Bool

First.has$getFirst, Last.has$getLast

𝖆 → 𝖆

Monoid_->.mempty

Monoid this ⇒ [this] → this

Monoid.mconcat

Monoid this ⇒ Int → this → this

Monoid.mtimes

Monoid 𝖆 ⇒ IO 𝖆 → IO 𝖆 → IO 𝖆

Monoid_IO.mappend

Monoid 𝖆 ⇒ [IO 𝖆] → IO 𝖆

Monoid_IO.sconcat, Monoid_IO.mconcat

Monoid 𝖆 ⇒ IntIO 𝖆 → IO 𝖆

Monoid_IO.stimes, Monoid_IO.mtimes

Semigroup this ⇒ [this] → this

Semigroup.sconcat

Semigroup this ⇒ Int → this → this

Semigroup.stimes

Semigroup this ⇒ this → this → this

Semigroup.mappend

Semigroup 𝖆 ⇒ Maybe 𝖆 → Maybe 𝖆 → Maybe 𝖆

Monoid_Maybe.mappend

Semigroup 𝖆 ⇒ [Maybe 𝖆] → Maybe 𝖆

Monoid_Maybe.sconcat, Monoid_Maybe.mconcat

Semigroup 𝖆 ⇒ IntMaybe 𝖆 → Maybe 𝖆

Monoid_Maybe.stimes, Monoid_Maybe.mtimes

Eq 𝖆 ⇒ First 𝖆 → First 𝖆 → Bool

Eq_First.!=, Eq_First.==

Eq 𝖆 ⇒ First 𝖆 → Int

Eq_First.hashCode

Eq 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Bool

Eq_Last.!=, Eq_Last.==

Eq 𝖆 ⇒ Last 𝖆 → Int

Eq_Last.hashCode

Ord 𝖆 ⇒ First 𝖆 → First 𝖆 → First 𝖆

Ord_First.min, Ord_First.max

Ord 𝖆 ⇒ First 𝖆 → First 𝖆 → Bool

Ord_First.>=, Ord_First.<, Ord_First.<=, Ord_First.>

Ord 𝖆 ⇒ First 𝖆 → First 𝖆 → Ordering

Ord_First.compare, Ord_First.<=>

Ord 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Last 𝖆

Ord_Last.min, Ord_Last.max

Ord 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Bool

Ord_Last.>=, Ord_Last.<, Ord_Last.<=, Ord_Last.>

Ord 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Ordering

Ord_Last.compare, Ord_Last.<=>

Show 𝖆 ⇒ First 𝖆 → String

Show_First.showsub, Show_First.display, Show_First.show

Show 𝖆 ⇒ First 𝖆 → [Char]

Show_First.showChars

Show 𝖆 ⇒ Last 𝖆 → String

Show_Last.showsub, Show_Last.display, Show_Last.show

Show 𝖆 ⇒ Last 𝖆 → [Char]

Show_Last.showChars

Show 𝖆 ⇒ [First 𝖆] → StringString

Show_First.showList

Show 𝖆 ⇒ [Last 𝖆] → StringString

Show_Last.showList

Show 𝖆 ⇒ IntFirst 𝖆 → StringString

Show_First.showsPrec

Show 𝖆 ⇒ IntLast 𝖆 → StringString

Show_Last.showsPrec

First 𝖆

Monoid_First.mempty

Last 𝖆

Monoid_Last.mempty

[𝖆]

Monoid_[].mempty

Monoid this ⇒ this

Monoid.mempty

Monoid 𝖆 ⇒ IO 𝖆

Monoid_IO.mempty

Semigroup 𝖆 ⇒ Maybe 𝖆

Monoid_Maybe.mempty

First 𝖆 → (Maybe 𝖆→Maybe 𝖇) → First 𝖇

First.chg$getFirst

First 𝖆 → Maybe 𝖇 → First 𝖇

First.upd$getFirst

Last 𝖆 → (Maybe 𝖆→Maybe 𝖇) → Last 𝖇

Last.chg$getLast

Last 𝖆 → Maybe 𝖇 → Last 𝖇

Last.upd$getLast

Valid HTML 4.01 Strict