Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Rebuild docs
Browse files Browse the repository at this point in the history
  • Loading branch information
garyb committed Jun 6, 2015
1 parent b6e7599 commit d6db1a6
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 50 deletions.
14 changes: 7 additions & 7 deletions docs/Data.Monoid.Additive.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions docs/Data.Monoid.Conj.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions docs/Data.Monoid.Disj.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions docs/Data.Monoid.Dual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions docs/Data.Monoid.Endo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions docs/Data.Monoid.Multiplicative.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions docs/Data.Monoid.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<>`:

Expand All @@ -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)
```


0 comments on commit d6db1a6

Please sign in to comment.