@@ -2,8 +2,6 @@
3## Module Prelude
3## Module Prelude
7#### `otherwise`
5#### `otherwise`
9``` purescript
7``` purescript
@@ -72,8 +70,7 @@ element `id`, just composable morphisms.
73`Semigroupoid`s should obey the following rule:
71`Semigroupoid`s should obey the following rule:
75−Association:
73+- Associativity: `p <<< (q <<< r) = (p <<< q) <<< r`
76− `forall p q r. p <<< (q <<< r) = (p <<< q) <<< r`
79#### `semigroupoidArr`
76#### `semigroupoidArr`
@@ -102,11 +99,8 @@ class (Semigroupoid a) <= Category a where
103`Category`s should obey the following rules.
100`Category`s should obey the following rules.
105−Left Identity:
102+- Left Identity: `id <<< p = p`
106− `forall p. id <<< p = p`
108−Right Identity:
103+- Right Identity: `p <<< id = p`
109− `forall p. p <<< id = p`
112#### `categoryArr`
106#### `categoryArr`
@@ -235,11 +229,8 @@ between [`Category`](#category)s that preserves structure.
236`Functor`s should obey the following rules.
230`Functor`s should obey the following rules.
238−Identity:
232+- Identity: `(<$>) id = id`
241−Composition:
233+- Composition: `(<$>) (f <<< g) = (<$> f) <<< (<$> g)`
242− `forall f g. (<$>) (f . g) = ((<$>) f) . ((<$>) g)`
245#### `(<#>)`
236#### `(<#>)`
@@ -266,10 +257,9 @@ class (Functor f) <= Apply f where
266`Apply`s are intuitively [`Applicative`](#applicative)s less `pure`, and more formally a
257`Apply`s are intuitively [`Applicative`](#applicative)s less `pure`, and more formally a
267strong lax semi-monoidal endofunctor.
258strong lax semi-monoidal endofunctor.
269−`Apply`s should obey the following rules.
260+`Apply`s should obey the following rule.
271−Associative Composition:
262+- Associative Composition: `(<<<) <$> f <*> g <*> h = f <*> (g <*> h)`
272− `forall f g h. (.) <$> f <*> g <*> h = f <*> (g <*> h)`
275#### `Applicative`
265#### `Applicative`
@@ -284,17 +274,10 @@ class (Apply f) <= Applicative f where
285`Applicative`s should obey the following rules.
275`Applicative`s should obey the following rules.
287−Identity:
277+- Identity: `(pure id) <*> v = v`
288− `forall v. (pure id) <*> v = v`
290−Composition:
278+- Composition: `(pure <<<) <*> f <*> g <*> h = f <*> (g <*> h)`
291− `forall f g h. (pure (.)) <*> f <*> g <*> h = f <*> (g <*> h)`
294− `forall f x. (pure f) <*> (pure x) = pure (f x)`
279+- Homomorphism: `(pure f) <*> (pure x) = pure (f x)`
296−Interchange:
280+- Interchange: `u <*> (pure y) = (pure ($ y)) <*> u`
297− `forall u y. u <*> (pure y) = (pure (($) y)) <*> u`
300#### `liftA1`
283#### `liftA1`
@@ -315,8 +298,7 @@ A `Bind` is an [`Apply`](#apply) with a bind operation which sequentially compos
316`Bind`s should obey the following rule.
299`Bind`s should obey the following rule.
319− `forall f g x. (x >>= f) >>= g = x >>= (\k => f k >>= g)`
301+- Associativity: `forall f g x. (x >>= f) >>= g = x >>= (\k => f k >>= g)`
322#### `Monad`
304#### `Monad`
@@ -330,11 +312,8 @@ more formally though of as a monoid in the category of endofunctors.
331`Monad`s should obey the following rules.
313`Monad`s should obey the following rules.
333−Left Identity:
315+- Left Identity: `pure x >>= f = f x`
334− `forall f x. pure x >>= f = f x`
336−Right Identity:
316+- Right Identity: `x >>= pure = x`
337− `forall x. x >>= pure = x`
340#### `return`
319#### `return`
@@ -403,7 +382,13 @@ class Semiring a where
406−Addition and multiplication
385+Addition and multiplication, satisfying the following laws:
387+- `a` is a commutative monoid under addition
388+- `a` is a monoid under multiplication
389+- multiplication distributes over addition
390+- multiplication by `zero` annihilates `a`
408#### `ModuloSemiring`
393#### `ModuloSemiring`
@@ -413,8 +398,10 @@ class (Semiring a) <= ModuloSemiring a where
413 mod :: a -> a -> a
398 mod :: a -> a -> a
416−Semiring with modulo operation and division where
401+Addition, multiplication, modulo operation and division, satisfying:
417−```a / b * b + (a `mod` b) = a```
403+- ```a / b * b + (a `mod` b) = a```
419#### `Ring`
406#### `Ring`
@@ -423,7 +410,12 @@ class (Semiring a) <= Ring a where
423 (-) :: a -> a -> a
410 (-) :: a -> a -> a
426−Addition, multiplication, and subtraction
413+Addition, multiplication, and subtraction.
415+Has the same laws as `Semiring` but additionally satisfying:
417+- `a` is an abelian group under addition
428#### `negate`
420#### `negate`
@@ -438,8 +430,10 @@ negate :: forall a. (Ring a) => a -> a
438class (Ring a, ModuloSemiring a) <= DivisionRing a where
430class (Ring a, ModuloSemiring a) <= DivisionRing a where
441−Ring where every nonzero element has a multiplicative inverse (possibly
433+Ring where every nonzero element has a multiplicative inverse so that:
442−a non-commutative field) so that ```a `mod` b = zero```
435+- ```a `mod` b = zero```
444#### `Num`
438#### `Num`
@@ -507,6 +501,7 @@ class Eq a where
507 (/=) :: a -> a -> Boolean
501 (/=) :: a -> a -> Boolean
504+Class for types that have an equality comparison.
511#### `refEq`
506#### `refEq`
@@ -595,6 +590,14 @@ class (Eq a) <= Ord a where
595 compare :: a -> a -> Ordering
590 compare :: a -> a -> Ordering
593+Class for types that have ordered comparisons.
595+Represents a partially ordered set satisfying the following laws:
597+- Reflexivity: `a <= a`
598+- Antisymmetry: if `a <= b` and `b <= a` then `a = b`
599+- Transitivity: if `a <= b` and `b <= c` then `a <= c`
599#### `(<)`
602#### `(<)`
@@ -736,8 +739,6 @@ instance semigroupArr :: (Semigroup s') => Semigroup (s -> s')
737## Module Data.Function
740## Module Data.Function
743``` purescript
744``` purescript
@@ -979,8 +980,6 @@ runFn10 :: forall a b c d e f g h i j k. Fn10 a b c d e f g h i j k -> a -> b ->
980## Module Prelude.Unsafe
981## Module Prelude.Unsafe
984#### `unsafeIndex`
983#### `unsafeIndex`
986``` purescript
985``` purescript
@@ -991,8 +990,6 @@ unsafeIndex :: forall a. [a] -> Number -> a
992## Module Control.Monad.Eff
991## Module Control.Monad.Eff
996#### `Eff`
993#### `Eff`
998``` purescript
995``` purescript
@@ -1094,8 +1091,6 @@ foreachE :: forall e a. [a] -> (a -> Eff e Unit) -> Eff e Unit
1095## Module Control.Monad.Eff.Unsafe
1092## Module Control.Monad.Eff.Unsafe
1099#### `unsafeInterleaveEff`
1094#### `unsafeInterleaveEff`
1101``` purescript
1096``` purescript
@@ -1106,8 +1101,6 @@ unsafeInterleaveEff :: forall eff1 eff2 a. Eff eff1 a -> Eff eff2 a
1107## Module Debug.Trace
1102## Module Debug.Trace
1111#### `Trace`
1104#### `Trace`
1113``` purescript
1106``` purescript
@@ -1132,8 +1125,6 @@ print :: forall a r. (Show a) => a -> Eff (trace :: Trace | r) Unit
1133## Module Control.Monad.ST
1126## Module Control.Monad.ST
1137#### `ST`
1128#### `ST`
1139``` purescript
1130``` purescript