Module Data.wrapper.Num

Monoid wrappers for numeric data

Imports

Table of Content

Definitions

data Product a

Monoid wrapper for numbers with operation Num.* and identity 1

Constructors

Product {unwrap ∷ a}

wrap a number

Member Functions

unwrapProduct 𝖆 → 𝖆

access field unwrap

getProductProduct 𝖆 → 𝖆

Alias for Product.unwrap

data Sum a

Monoid wrapper for numbers with operation Num.+ and identity 0

Constructors

Sum {unwrap ∷ a}

wrap a number

Member Functions

unwrapSum 𝖆 → 𝖆

access field unwrap

getSumSum 𝖆 → 𝖆

Alias for Sum.unwrap

Instances

instance Eq a ⇒ Eq (Product a)

Member Functions

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

inherited from Eq.!=

==Eq 𝖆 ⇒ Product 𝖆Product 𝖆Bool
infix  7

Function generated for derived instance.

hashCodeEq 𝖆 ⇒ Product 𝖆Int

Function generated for derived instance.

instance Eq a ⇒ Eq (Sum a)

Member Functions

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

inherited from Eq.!=

==Eq 𝖆 ⇒ Sum 𝖆Sum 𝖆Bool
infix  7

Function generated for derived instance.

hashCodeEq 𝖆 ⇒ Sum 𝖆Int

Function generated for derived instance.

instance Num a ⇒ Monoid (Product a)

The Monoid instance for Product has identity 1

Member Functions

mconcatNum 𝖆 ⇒ [Product 𝖆]Product 𝖆

inherited from Monoid.mconcat

memptyNum 𝖆 ⇒ Product 𝖆
 Product 1@   
mtimesNum 𝖆 ⇒ IntProduct 𝖆 → Product 𝖆

inherited from Monoid.mtimes

instance Num a ⇒ Monoid (Sum a)

The Monoid instance for Sum has identity 0

Member Functions

mconcatNum 𝖆 ⇒ [Sum 𝖆]Sum 𝖆

inherited from Monoid.mconcat

memptyNum 𝖆 ⇒ Sum 𝖆
 Sum 0   
mtimesNum 𝖆 ⇒ IntSum 𝖆 → Sum 𝖆

inherited from Monoid.mtimes

instance Ord a ⇒ Ord (Product a)

Member Functions

<Ord 𝖆 ⇒ Product 𝖆Product 𝖆Bool
infix  9

inherited from Ord.<

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

inherited from Ord.<=

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

Function generated for derived instance.

>Ord 𝖆 ⇒ Product 𝖆Product 𝖆Bool
infix  9

inherited from Ord.>

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

inherited from Ord.>=

compareOrd 𝖆 ⇒ Product 𝖆Product 𝖆Ordering
infix  8

inherited from Ord.compare

maxOrd 𝖆 ⇒ Product 𝖆Product 𝖆Product 𝖆

inherited from Ord.max

minOrd 𝖆 ⇒ Product 𝖆Product 𝖆Product 𝖆

inherited from Ord.min

instance Ord a ⇒ Ord (Sum a)

Member Functions

<Ord 𝖆 ⇒ Sum 𝖆Sum 𝖆Bool
infix  9

inherited from Ord.<

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

inherited from Ord.<=

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

Function generated for derived instance.

>Ord 𝖆 ⇒ Sum 𝖆Sum 𝖆Bool
infix  9

inherited from Ord.>

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

inherited from Ord.>=

compareOrd 𝖆 ⇒ Sum 𝖆Sum 𝖆Ordering
infix  8

inherited from Ord.compare

maxOrd 𝖆 ⇒ Sum 𝖆Sum 𝖆Sum 𝖆

inherited from Ord.max

minOrd 𝖆 ⇒ Sum 𝖆Sum 𝖆Sum 𝖆

inherited from Ord.min

instance Num a ⇒ Semigroup (Product a)

The Semigroup instance for Product uses operation Num.*

Member Functions

mappendNum 𝖆 ⇒ Product 𝖆Product 𝖆Product 𝖆
infixr  13
 Product 3 <> Product 7 == Product 21@   
sconcatNum 𝖆 ⇒ [Product 𝖆]Product 𝖆

inherited from Semigroup.sconcat

stimesNum 𝖆 ⇒ IntProduct 𝖆 → Product 𝖆

inherited from Semigroup.stimes

instance Num a ⇒ Semigroup (Sum a)

The Semigroup instance for Sum uses operation Num.+

Member Functions

mappendNum 𝖆 ⇒ Sum 𝖆Sum 𝖆Sum 𝖆
infixr  13
 Sum 19 <> Sum 23 == Sum 42   
sconcatNum 𝖆 ⇒ [Sum 𝖆]Sum 𝖆

inherited from Semigroup.sconcat

stimesNum 𝖆 ⇒ IntSum 𝖆 → Sum 𝖆

inherited from Semigroup.stimes

instance Show a ⇒ Show (Product a)

Member Functions

displayShow 𝖆 ⇒ Product 𝖆String

inherited from Show.display

showShow 𝖆 ⇒ Product 𝖆String

Function generated for derived instance.

showCharsShow 𝖆 ⇒ Product 𝖆 → [Char]

inherited from Show.showChars

showListShow 𝖆 ⇒ [Product 𝖆]StringString

inherited from Show.showList

showsPrecShow 𝖆 ⇒ IntProduct 𝖆StringString

inherited from Show.showsPrec

showsubShow 𝖆 ⇒ Product 𝖆String

Function generated for derived instance.

instance Show a ⇒ Show (Sum a)

Member Functions

displayShow 𝖆 ⇒ Sum 𝖆String

inherited from Show.display

showShow 𝖆 ⇒ Sum 𝖆String

Function generated for derived instance.

showCharsShow 𝖆 ⇒ Sum 𝖆 → [Char]

inherited from Show.showChars

showListShow 𝖆 ⇒ [Sum 𝖆]StringString

inherited from Show.showList

showsPrecShow 𝖆 ⇒ IntSum 𝖆StringString

inherited from Show.showsPrec

showsubShow 𝖆 ⇒ Sum 𝖆String

Function generated for derived instance.

Functions and Values by Type

Product 𝖆 → 𝖆

Product.unwrap

Sum 𝖆 → 𝖆

Sum.unwrap

a → Product a

Product.Product

a → Sum a

Sum.Sum

𝖆 → Bool

Product.has$unwrap, Sum.has$unwrap

Eq 𝖆 ⇒ Product 𝖆 → Product 𝖆 → Bool

Eq_Product.!=, Eq_Product.==

Eq 𝖆 ⇒ Product 𝖆 → Int

Eq_Product.hashCode

Eq 𝖆 ⇒ Sum 𝖆 → Sum 𝖆 → Bool

Eq_Sum.!=, Eq_Sum.==

Eq 𝖆 ⇒ Sum 𝖆 → Int

Eq_Sum.hashCode

Num 𝖆 ⇒ Product 𝖆 → Product 𝖆 → Product 𝖆

Semigroup_Product.mappend

Num 𝖆 ⇒ Sum 𝖆 → Sum 𝖆 → Sum 𝖆

Semigroup_Sum.mappend

Num 𝖆 ⇒ [Product 𝖆] → Product 𝖆

Monoid_Product.mconcat, Semigroup_Product.sconcat

Num 𝖆 ⇒ [Sum 𝖆] → Sum 𝖆

Monoid_Sum.mconcat, Semigroup_Sum.sconcat

Num 𝖆 ⇒ IntProduct 𝖆 → Product 𝖆

Monoid_Product.mtimes, Semigroup_Product.stimes

Num 𝖆 ⇒ IntSum 𝖆 → Sum 𝖆

Monoid_Sum.mtimes, Semigroup_Sum.stimes

Ord 𝖆 ⇒ Product 𝖆 → Product 𝖆 → Product 𝖆

Ord_Product.min, Ord_Product.max

Ord 𝖆 ⇒ Product 𝖆 → Product 𝖆 → Bool

Ord_Product.>=, Ord_Product.<, Ord_Product.<=, Ord_Product.>

Ord 𝖆 ⇒ Product 𝖆 → Product 𝖆 → Ordering

Ord_Product.compare, Ord_Product.<=>

Ord 𝖆 ⇒ Sum 𝖆 → Sum 𝖆 → Sum 𝖆

Ord_Sum.min, Ord_Sum.max

Ord 𝖆 ⇒ Sum 𝖆 → Sum 𝖆 → Bool

Ord_Sum.>=, Ord_Sum.<, Ord_Sum.<=, Ord_Sum.>

Ord 𝖆 ⇒ Sum 𝖆 → Sum 𝖆 → Ordering

Ord_Sum.compare, Ord_Sum.<=>

Show 𝖆 ⇒ Product 𝖆 → String

Show_Product.showsub, Show_Product.display, Show_Product.show

Show 𝖆 ⇒ Product 𝖆 → [Char]

Show_Product.showChars

Show 𝖆 ⇒ Sum 𝖆 → String

Show_Sum.showsub, Show_Sum.display, Show_Sum.show

Show 𝖆 ⇒ Sum 𝖆 → [Char]

Show_Sum.showChars

Show 𝖆 ⇒ [Product 𝖆] → StringString

Show_Product.showList

Show 𝖆 ⇒ [Sum 𝖆] → StringString

Show_Sum.showList

Show 𝖆 ⇒ IntProduct 𝖆 → StringString

Show_Product.showsPrec

Show 𝖆 ⇒ IntSum 𝖆 → StringString

Show_Sum.showsPrec

Num 𝖆 ⇒ Product 𝖆

Monoid_Product.mempty

Num 𝖆 ⇒ Sum 𝖆

Monoid_Sum.mempty

Product 𝖆 → 𝖇 → Product 𝖇

Product.upd$unwrap

Product 𝖇 → (𝖇→𝖆) → Product 𝖆

Product.chg$unwrap

Sum 𝖆 → 𝖇 → Sum 𝖇

Sum.upd$unwrap

Sum 𝖇 → (𝖇→𝖆) → Sum 𝖆

Sum.chg$unwrap

Valid HTML 4.01 Strict