Skip to content

Commit a1bf336

Browse files
committed
Updates for 0.7
1 parent f1bcb8f commit a1bf336

21 files changed

+145
-152
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bower install purescript-control
1717
## Module documentation
1818

1919
### Functor/Applicative
20-
- [Control.Functor](docs/Control.Functor.md)
20+
- [Data.Functor](docs/Data.Functor.md)
2121
- [Control.Apply](docs/Control.Apply.md)
2222

2323
### Monad

bower.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
{
22
"name": "purescript-control",
33
"homepage": "https://github.com/purescript/purescript-control",
4-
"description": "Monad and Applicative utility functions",
4+
"description": "Common control classes and utility functions",
55
"keywords": [
6-
"purescript"
6+
"purescript",
7+
"functor",
8+
"applicative",
9+
"monad",
10+
"comonad"
711
],
812
"license": "MIT",
13+
"repository": {
14+
"type": "git",
15+
"url": "git://github.com/purescript/purescript-control.git"
16+
},
917
"ignore": [
1018
"**/.*",
1119
"bower_components",
1220
"node_modules",
1321
"output",
22+
"test",
1423
"bower.json",
1524
"gulpfile.js",
1625
"package.json"

docs/Control.Alt.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Alt
42

5-
63
This module defines the `Alt` type class.
74

85
#### `Alt`
@@ -34,4 +31,3 @@ For example, the `Array` (`[]`) type is an instance of `Alt`, where
3431
An infix version of `alt`.
3532

3633

37-

docs/Control.Alternative.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
# Module Documentation
2-
31
## Module Control.Alternative
42

5-
63
This module defines the `Alternative` type class and associated
74
helper functions.
85

96
#### `Alternative`
107

118
``` purescript
12-
class (Applicative f, Plus f) <= Alternative f where
9+
class (Applicative f, Plus f) <= Alternative f
1310
```
1411

1512
The `Alternative` type class has no members of its own; it just specifies
@@ -22,4 +19,3 @@ laws:
2219
- Annihilation: `empty <*> f = empty`
2320

2421

25-

docs/Control.Apply.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Apply
42

5-
63
This module defines helper functions for working with `Apply` instances.
74

85
#### `(<*)`
@@ -58,4 +55,3 @@ Lift a function of five arguments to a function which accepts and returns
5855
values wrapped with the type constructor `f`.
5956

6057

61-

docs/Control.Bind.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Bind
42

5-
63
This module defines helper functions for working with `Bind` instances.
74

85
#### `(=<<)`
@@ -51,7 +48,7 @@ Collapse two applications of a monadic type constructor into one.
5148
ifM :: forall a m. (Bind m) => m Boolean -> m a -> m a -> m a
5249
```
5350

54-
Execute a monadic action if a condition holds.
51+
Execute a monadic action if a condition holds.
5552

5653
For example:
5754

@@ -62,4 +59,3 @@ main = ifM ((< 0.5) <$> random)
6259
```
6360

6461

65-

docs/Control.Comonad.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Comonad
42

5-
63
This module defines the `Comonad` type class.
74

85
#### `Comonad`
@@ -24,4 +21,3 @@ Laws:
2421
- Right Identity: `extract (f <<= xs) = f xs`
2522

2623

27-

docs/Control.Extend.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Extend
42

5-
63
This module defines the `Extend` type class and associated helper functions.
74

85
#### `Extend`
@@ -12,24 +9,22 @@ class (Functor w) <= Extend w where
129
extend :: forall b a. (w a -> b) -> w a -> w b
1310
```
1411

12+
##### Instances
13+
``` purescript
14+
instance extendFn :: (Semigroup w) => Extend (Function w)
15+
```
16+
1517
The `Extend` class defines the extension operator `(<<=)`
1618
which extends a local context-dependent computation to
1719
a global computation.
1820

19-
`Extend` is the dual of `Bind`, and `(<<=)` is the dual of
21+
`Extend` is the dual of `Bind`, and `(<<=)` is the dual of
2022
`(>>=)`.
2123

2224
Laws:
2325

2426
- Associativity: `extend f <<< extend g = extend (f <<< extend g)`
2527

26-
#### `extendArr`
27-
28-
``` purescript
29-
instance extendArr :: (Semigroup w) => Extend (Prim.Function w)
30-
```
31-
32-
3328
#### `(<<=)`
3429

3530
``` purescript
@@ -73,4 +68,3 @@ Duplicate a comonadic context.
7368
`duplicate` is dual to `Control.Bind.join`.
7469

7570

76-

docs/Control.Lazy.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Lazy
42

5-
63
This module defines the `Lazy` type class and associated
74
helper functions.
85

@@ -30,4 +27,3 @@ fix :: forall l a. (Lazy l) => (l -> l) -> l
3027
The `Lazy` instance allows us to generate the result lazily.
3128

3229

33-

docs/Control.Monad.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Module Documentation
2-
31
## Module Control.Monad
42

5-
63
This module defines helper functions for working with `Monad` instances.
74

85
#### `when`
@@ -22,4 +19,3 @@ unless :: forall m. (Monad m) => Boolean -> m Unit -> m Unit
2219
Perform a monadic action unless a condition is true.
2320

2421

25-

0 commit comments

Comments
 (0)