From d6db1a67c25cda4961b50f65a003cae0b0657384 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Sat, 6 Jun 2015 21:46:20 +0100 Subject: [PATCH] Rebuild docs --- docs/Data.Monoid.Additive.md | 14 +++++++------- docs/Data.Monoid.Conj.md | 14 +++++++------- docs/Data.Monoid.Disj.md | 14 +++++++------- docs/Data.Monoid.Dual.md | 14 +++++++------- docs/Data.Monoid.Endo.md | 14 +++++++------- docs/Data.Monoid.Multiplicative.md | 14 +++++++------- docs/Data.Monoid.md | 16 ++++++++-------- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/Data.Monoid.Additive.md b/docs/Data.Monoid.Additive.md index e444485..cf18277 100644 --- a/docs/Data.Monoid.Additive.md +++ b/docs/Data.Monoid.Additive.md @@ -7,6 +7,13 @@ newtype Additive a = Additive a ``` +Monoid and semigroup for semirings under addition. + +``` purescript +Additive x <> Additive y == Additive (x + y) +mempty :: Additive _ == Additive zero +``` + ##### Instances ``` purescript instance eqAdditive :: (Eq a) => Eq (Additive a) @@ -24,13 +31,6 @@ instance semigroupAdditive :: (Semiring a) => Semigroup (Additive a) instance monoidAdditive :: (Semiring a) => Monoid (Additive a) ``` -Monoid and semigroup for semirings under addition. - -``` purescript -Additive x <> Additive y == Additive (x + y) -mempty :: Additive _ == Additive zero -``` - #### `runAdditive` ``` purescript diff --git a/docs/Data.Monoid.Conj.md b/docs/Data.Monoid.Conj.md index fc96f49..ca2093e 100644 --- a/docs/Data.Monoid.Conj.md +++ b/docs/Data.Monoid.Conj.md @@ -7,6 +7,13 @@ newtype Conj a = Conj a ``` +Monoid under conjuntion. + +``` purescript +Conj x <> Conj y == Conj (x && y) +mempty :: Conj _ == Conj top +``` + ##### Instances ``` purescript instance eqConj :: (Eq a) => Eq (Conj a) @@ -24,13 +31,6 @@ instance semigroupConj :: (BooleanAlgebra a) => Semigroup (Conj a) instance monoidConj :: (BooleanAlgebra a) => Monoid (Conj a) ``` -Monoid under conjuntion. - -``` purescript -Conj x <> Conj y == Conj (x && y) -mempty :: Conj _ == Conj bottom -``` - #### `runConj` ``` purescript diff --git a/docs/Data.Monoid.Disj.md b/docs/Data.Monoid.Disj.md index c56291d..d690d61 100644 --- a/docs/Data.Monoid.Disj.md +++ b/docs/Data.Monoid.Disj.md @@ -7,6 +7,13 @@ newtype Disj a = Disj a ``` +Monoid under disjuntion. + +``` purescript +Disj x <> Disj y == Disj (x || y) +mempty :: Disj _ == Disj bottom +``` + ##### Instances ``` purescript instance eqDisj :: (Eq a) => Eq (Disj a) @@ -24,13 +31,6 @@ instance semigroupDisj :: (BooleanAlgebra a) => Semigroup (Disj a) instance monoidDisj :: (BooleanAlgebra a) => Monoid (Disj a) ``` -Monoid under disjuntion. - -``` purescript -Disj x <> Disj y == Disj (x || y) -mempty :: Disj _ == Disj top -``` - #### `runDisj` ``` purescript diff --git a/docs/Data.Monoid.Dual.md b/docs/Data.Monoid.Dual.md index 063e5b2..46c621f 100644 --- a/docs/Data.Monoid.Dual.md +++ b/docs/Data.Monoid.Dual.md @@ -7,6 +7,13 @@ newtype Dual a = Dual a ``` +The dual of a monoid. + +``` purescript +Dual x <> Dual y == Dual (y <> x) +mempty :: Dual _ == Dual mempty +``` + ##### Instances ``` purescript instance eqDual :: (Eq a) => Eq (Dual a) @@ -24,13 +31,6 @@ instance semigroupDual :: (Semigroup a) => Semigroup (Dual a) instance monoidDual :: (Monoid a) => Monoid (Dual a) ``` -The dual of a monoid. - -``` purescript -Dual x <> Dual y == Dual (y <> x) -mempty :: Dual _ == Dual mempty -``` - #### `runDual` ``` purescript diff --git a/docs/Data.Monoid.Endo.md b/docs/Data.Monoid.Endo.md index cca1acd..959a12c 100644 --- a/docs/Data.Monoid.Endo.md +++ b/docs/Data.Monoid.Endo.md @@ -7,13 +7,6 @@ newtype Endo a = Endo (a -> a) ``` -##### Instances -``` purescript -instance invariantEndo :: Invariant Endo -instance semigroupEndo :: Semigroup (Endo a) -instance monoidEndo :: Monoid (Endo a) -``` - Monoid of endomorphisms under composition. Composes of functions of type `a -> a`: @@ -22,6 +15,13 @@ Endo f <> Endo g == Endo (f <<< g) mempty :: Endo _ == Endo id ``` +##### Instances +``` purescript +instance invariantEndo :: Invariant Endo +instance semigroupEndo :: Semigroup (Endo a) +instance monoidEndo :: Monoid (Endo a) +``` + #### `runEndo` ``` purescript diff --git a/docs/Data.Monoid.Multiplicative.md b/docs/Data.Monoid.Multiplicative.md index 681d391..85a361f 100644 --- a/docs/Data.Monoid.Multiplicative.md +++ b/docs/Data.Monoid.Multiplicative.md @@ -7,6 +7,13 @@ newtype Multiplicative a = Multiplicative a ``` +Monoid and semigroup for semirings under multiplication. + +``` purescript +Multiplicative x <> Multiplicative y == Multiplicative (x * y) +mempty :: Multiplicative _ == Multiplicative one +``` + ##### Instances ``` purescript instance eqMultiplicative :: (Eq a) => Eq (Multiplicative a) @@ -24,13 +31,6 @@ instance semigroupMultiplicative :: (Semiring a) => Semigroup (Multiplicative a) instance monoidMultiplicative :: (Semiring a) => Monoid (Multiplicative a) ``` -Monoid and semigroup for semirings under multiplication. - -``` purescript -Multiplicative x <> Multiplicative y == Multiplicative (x * y) -mempty :: Multiplicative _ == Multiplicative one -``` - #### `runMultiplicative` ``` purescript diff --git a/docs/Data.Monoid.md b/docs/Data.Monoid.md index 234978a..73b8bac 100644 --- a/docs/Data.Monoid.md +++ b/docs/Data.Monoid.md @@ -7,14 +7,6 @@ class (Semigroup m) <= Monoid m where mempty :: m ``` -##### Instances -``` purescript -instance monoidUnit :: Monoid Unit -instance monoidFn :: (Monoid b) => Monoid (a -> b) -instance monoidString :: Monoid String -instance monoidArray :: Monoid (Array a) -``` - A `Monoid` is a `Semigroup` with a value `mempty`, which is both a left and right unit for the associative operation `<>`: @@ -26,4 +18,12 @@ forall x. mempty <> x = x <> mempty = x `<>` is used to combine individual results, and `mempty` gives the result of folding an empty collection of elements. +##### Instances +``` purescript +instance monoidUnit :: Monoid Unit +instance monoidFn :: (Monoid b) => Monoid (a -> b) +instance monoidString :: Monoid String +instance monoidArray :: Monoid (Array a) +``` +