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

mappend ∷ Semigroup this ⇒ this → this → this
infixr  13
sconcat ∷ Semigroup this ⇒ [this] → this
stimes ∷ Semigroup this ⇒ Int → this → this
class Semigroup this ⇒ Monoid this

Known Instances

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

Member Functions

mconcat ∷ Monoid this ⇒ [this] → this
mempty ∷ Monoid this ⇒ this
mtimes ∷ Monoid this ⇒ Int → this → this
data First a

Constructors

First {getFirst ∷ Maybe a}

Member Functions

getFirst ∷ First 𝖆 → Maybe 𝖆

access field getFirst

data Last a

Constructors

Last {getLast ∷ Maybe a}

Member Functions

getLast ∷ Last 𝖆 → 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.

hashCode ∷ Eq 𝖆 ⇒ 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.

hashCode ∷ Eq 𝖆 ⇒ Last 𝖆 → Int

Function generated for derived instance.

instance Monoid ()

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ ()
mtimes ∷ Int → () → ()

inherited from Monoid.mtimes

sconcat ∷ [()] → ()

inherited from Semigroup.sconcat

stimes ∷ Int → () → ()

inherited from Semigroup.stimes

instance Monoid (a→a)

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ 𝖆 → 𝖆
mtimes ∷ Int → (𝖆→𝖆) → 𝖆 → 𝖆

inherited from Monoid.mtimes

sconcat ∷ [𝖆→𝖆] → 𝖆 → 𝖆

inherited from Semigroup.sconcat

stimes ∷ Int → (𝖆→𝖆) → 𝖆 → 𝖆

inherited from Semigroup.stimes

instance Monoid (First a)

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ First 𝖆
mtimes ∷ Int → First 𝖆 → First 𝖆

inherited from Monoid.mtimes

sconcat ∷ [First 𝖆] → First 𝖆

inherited from Semigroup.sconcat

stimes ∷ Int → First 𝖆 → First 𝖆

inherited from Semigroup.stimes

instance Monoid a ⇒ Monoid (IO a)

Member Functions

mappend ∷ Monoid 𝖆 ⇒ IO 𝖆 → IO 𝖆 → IO 𝖆
infixr  13
mconcat ∷ Monoid 𝖆 ⇒ [IO 𝖆] → IO 𝖆

inherited from Monoid.mconcat

mempty ∷ Monoid 𝖆 ⇒ IO 𝖆
mtimes ∷ Monoid 𝖆 ⇒ Int → IO 𝖆 → IO 𝖆

inherited from Monoid.mtimes

sconcat ∷ Monoid 𝖆 ⇒ [IO 𝖆] → IO 𝖆

inherited from Semigroup.sconcat

stimes ∷ Monoid 𝖆 ⇒ Int → IO 𝖆 → IO 𝖆

inherited from Semigroup.stimes

instance Monoid (Last a)

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ Last 𝖆
mtimes ∷ Int → Last 𝖆 → Last 𝖆

inherited from Monoid.mtimes

sconcat ∷ [Last 𝖆] → Last 𝖆

inherited from Semigroup.sconcat

stimes ∷ Int → Last 𝖆 → Last 𝖆

inherited from Semigroup.stimes

instance Semigroup a ⇒ Monoid (Maybe a)

Member Functions

mappend ∷ Semigroup 𝖆 ⇒ Maybe 𝖆 → Maybe 𝖆 → Maybe 𝖆
infixr  13
mconcat ∷ Semigroup 𝖆 ⇒ [Maybe 𝖆] → Maybe 𝖆

inherited from Monoid.mconcat

mempty ∷ Semigroup 𝖆 ⇒ Maybe 𝖆
mtimes ∷ Semigroup 𝖆 ⇒ Int → Maybe 𝖆 → Maybe 𝖆

inherited from Monoid.mtimes

sconcat ∷ Semigroup 𝖆 ⇒ [Maybe 𝖆] → Maybe 𝖆

inherited from Semigroup.sconcat

stimes ∷ Semigroup 𝖆 ⇒ Int → Maybe 𝖆 → Maybe 𝖆

inherited from Semigroup.stimes

instance Monoid Ordering

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ Ordering
mtimes ∷ Int → Ordering → Ordering

inherited from Monoid.mtimes

sconcat ∷ [Ordering] → Ordering

inherited from Semigroup.sconcat

stimes ∷ Int → Ordering → Ordering

inherited from Semigroup.stimes

instance Monoid String

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ String
mtimes ∷ Int → String → String

inherited from Monoid.mtimes

sconcat ∷ [String] → String

inherited from Semigroup.sconcat

stimes ∷ Int → String → String

inherited from Semigroup.stimes

instance Monoid [a]

Member Functions

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

inherited from Monoid.mconcat

mempty ∷ [𝖆]
mtimes ∷ Int → [𝖆] → [𝖆]

inherited from Monoid.mtimes

sconcat ∷ [[𝖆]] → [𝖆]

inherited from Semigroup.sconcat

stimes ∷ Int → [𝖆] → [𝖆]

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.>=

compare ∷ Ord 𝖆 ⇒ First 𝖆 → First 𝖆 → Ordering
infix  8

inherited from Ord.compare

max ∷ Ord 𝖆 ⇒ First 𝖆 → First 𝖆 → First 𝖆

inherited from Ord.max

min ∷ Ord 𝖆 ⇒ 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.>=

compare ∷ Ord 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Ordering
infix  8

inherited from Ord.compare

max ∷ Ord 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Last 𝖆

inherited from Ord.max

min ∷ Ord 𝖆 ⇒ Last 𝖆 → Last 𝖆 → Last 𝖆

inherited from Ord.min

instance Show a ⇒ Show (First a)

Member Functions

display ∷ Show 𝖆 ⇒ First 𝖆 → String

inherited from Show.display

show ∷ Show 𝖆 ⇒ First 𝖆 → String

Function generated for derived instance.

showChars ∷ Show 𝖆 ⇒ First 𝖆 → [Char]

inherited from Show.showChars

showList ∷ Show 𝖆 ⇒ [First 𝖆] → String → String

inherited from Show.showList

showsPrec ∷ Show 𝖆 ⇒ Int → First 𝖆 → String → String

inherited from Show.showsPrec

showsub ∷ Show 𝖆 ⇒ First 𝖆 → String

Function generated for derived instance.

instance Show a ⇒ Show (Last a)

Member Functions

display ∷ Show 𝖆 ⇒ Last 𝖆 → String

inherited from Show.display

show ∷ Show 𝖆 ⇒ Last 𝖆 → String

Function generated for derived instance.

showChars ∷ Show 𝖆 ⇒ Last 𝖆 → [Char]

inherited from Show.showChars

showList ∷ Show 𝖆 ⇒ [Last 𝖆] → String → String

inherited from Show.showList

showsPrec ∷ Show 𝖆 ⇒ Int → Last 𝖆 → String → String

inherited from Show.showsPrec

showsub ∷ Show 𝖆 ⇒ Last 𝖆 → String

Function generated for derived instance.

Functions and Values by Type

String → String → String

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

Int → String → String

Monoid_String.stimes, Monoid_String.mtimes

Int → () → ()

Monoid_().stimes, Monoid_().mtimes

Int → Ordering → Ordering

Monoid_Ordering.stimes, Monoid_Ordering.mtimes

Ordering → Ordering → Ordering

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

Int → First 𝖆 → First 𝖆

Monoid_First.stimes, Monoid_First.mtimes

Int → Last 𝖆 → 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 𝖆 ⇒ Int → IO 𝖆 → 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 𝖆 ⇒ Int → Maybe 𝖆 → 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 𝖆] → String → String

Show_First.showList

Show 𝖆 ⇒ [Last 𝖆] → String → String

Show_Last.showList

Show 𝖆 ⇒ Int → First 𝖆 → String → String

Show_First.showsPrec

Show 𝖆 ⇒ Int → Last 𝖆 → String → String

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