Module Data.wrapper.Dual

Provides a wrapper for a Monoid that works in reverse

Imports

Table of Content

Definitions

data Dual a

Provides a Monoid where Semigroup.mappend appears flipped.

Constructors

Dual {unwrap ∷ a}

wrap a value to give a Dual

Member Functions

unwrapDual 𝖆 → 𝖆

access field unwrap

getDualDual 𝖆 → 𝖆

Alias for Dual.unwrap

Instances

instance Eq a ⇒ Eq (Dual a)

Member Functions

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

inherited from Eq.!=

==Eq 𝖆 ⇒ Dual 𝖆Dual 𝖆Bool
infix  7

Function generated for derived instance.

hashCodeEq 𝖆 ⇒ Dual 𝖆Int

Function generated for derived instance.

instance Monoid a ⇒ Monoid (Dual a)

Member Functions

mconcatMonoid 𝖆 ⇒ [Dual 𝖆]Dual 𝖆

inherited from Monoid.mconcat

memptyMonoid 𝖆 ⇒ Dual 𝖆

Dual e where e is the identity of the wrapped value.

mtimesMonoid 𝖆 ⇒ IntDual 𝖆 → Dual 𝖆

inherited from Monoid.mtimes

instance Ord a ⇒ Ord (Dual a)

Member Functions

<Ord 𝖆 ⇒ Dual 𝖆Dual 𝖆Bool
infix  9

inherited from Ord.<

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

inherited from Ord.<=

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

Function generated for derived instance.

>Ord 𝖆 ⇒ Dual 𝖆Dual 𝖆Bool
infix  9

inherited from Ord.>

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

inherited from Ord.>=

compareOrd 𝖆 ⇒ Dual 𝖆Dual 𝖆Ordering
infix  8

inherited from Ord.compare

maxOrd 𝖆 ⇒ Dual 𝖆Dual 𝖆Dual 𝖆

inherited from Ord.max

minOrd 𝖆 ⇒ Dual 𝖆Dual 𝖆Dual 𝖆

inherited from Ord.min

instance Semigroup a ⇒ Semigroup (Dual a)

Member Functions

mappendSemigroup 𝖆 ⇒ Dual 𝖆Dual 𝖆Dual 𝖆
infixr  13
 Dual "foo" <> Dual "bar" == Dual "barfoo"   
sconcatSemigroup 𝖆 ⇒ [Dual 𝖆]Dual 𝖆

inherited from Semigroup.sconcat

stimesSemigroup 𝖆 ⇒ IntDual 𝖆 → Dual 𝖆

inherited from Semigroup.stimes

instance Show a ⇒ Show (Dual a)

Member Functions

displayShow 𝖆 ⇒ Dual 𝖆String

inherited from Show.display

showShow 𝖆 ⇒ Dual 𝖆String

Function generated for derived instance.

showCharsShow 𝖆 ⇒ Dual 𝖆 → [Char]

inherited from Show.showChars

showListShow 𝖆 ⇒ [Dual 𝖆]StringString

inherited from Show.showList

showsPrecShow 𝖆 ⇒ IntDual 𝖆StringString

inherited from Show.showsPrec

showsubShow 𝖆 ⇒ Dual 𝖆String

Function generated for derived instance.

Functions and Values by Type

Dual 𝖆 → 𝖆

Dual.unwrap

a → Dual a

Dual.Dual

𝖆 → Bool

Dual.has$unwrap

Monoid 𝖆 ⇒ [Dual 𝖆] → Dual 𝖆

Monoid_Dual.mconcat

Monoid 𝖆 ⇒ IntDual 𝖆 → Dual 𝖆

Monoid_Dual.mtimes

Semigroup 𝖆 ⇒ Dual 𝖆 → Dual 𝖆 → Dual 𝖆

Semigroup_Dual.mappend

Semigroup 𝖆 ⇒ [Dual 𝖆] → Dual 𝖆

Semigroup_Dual.sconcat

Semigroup 𝖆 ⇒ IntDual 𝖆 → Dual 𝖆

Semigroup_Dual.stimes

Eq 𝖆 ⇒ Dual 𝖆 → Dual 𝖆 → Bool

Eq_Dual.!=, Eq_Dual.==

Eq 𝖆 ⇒ Dual 𝖆 → Int

Eq_Dual.hashCode

Ord 𝖆 ⇒ Dual 𝖆 → Dual 𝖆 → Dual 𝖆

Ord_Dual.min, Ord_Dual.max

Ord 𝖆 ⇒ Dual 𝖆 → Dual 𝖆 → Bool

Ord_Dual.>=, Ord_Dual.<, Ord_Dual.<=, Ord_Dual.>

Ord 𝖆 ⇒ Dual 𝖆 → Dual 𝖆 → Ordering

Ord_Dual.compare, Ord_Dual.<=>

Show 𝖆 ⇒ Dual 𝖆 → String

Show_Dual.showsub, Show_Dual.display, Show_Dual.show

Show 𝖆 ⇒ Dual 𝖆 → [Char]

Show_Dual.showChars

Show 𝖆 ⇒ [Dual 𝖆] → StringString

Show_Dual.showList

Show 𝖆 ⇒ IntDual 𝖆 → StringString

Show_Dual.showsPrec

Monoid 𝖆 ⇒ Dual 𝖆

Monoid_Dual.mempty

Dual 𝖆 → 𝖇 → Dual 𝖇

Dual.upd$unwrap

Dual 𝖇 → (𝖇→𝖆) → Dual 𝖆

Dual.chg$unwrap

Valid HTML 4.01 Strict