Skip to content

Commit b9e1148

Browse files
committed
update docs
1 parent 81a0963 commit b9e1148

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

MODULES.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,30 @@ A pure asynchronous computation, having no effects.
2424
#### `Canceler`
2525

2626
``` purescript
27-
type Canceler e = Error -> Aff e Boolean
27+
newtype Canceler e
28+
= Canceler (Error -> Aff e Boolean)
2829
```
2930

31+
A canceler is asynchronous function that can be used to attempt the
32+
cancelation of a computation. Returns a boolean flag indicating whether
33+
or not the cancellation was successful.
34+
35+
#### `cancel`
36+
37+
``` purescript
38+
cancel :: forall e. Canceler e -> Error -> Aff e Boolean
39+
```
40+
41+
Unwraps the canceler function from the newtype that wraps it.
42+
43+
#### `cancelWith`
44+
45+
``` purescript
46+
cancelWith :: forall e a. Aff e a -> Canceler e -> Aff e a
47+
```
48+
49+
If the first asynchronous computation is canceled, then the specified
50+
canceler will also be called.
3051

3152
#### `launchAff`
3253

@@ -216,11 +237,22 @@ instance monadPlusAff :: MonadPlus (Aff e)
216237
```
217238

218239

240+
#### `semigroupCanceler`
241+
242+
``` purescript
243+
instance semigroupCanceler :: Semigroup (Canceler e)
244+
```
219245

220-
## Module Control.Monad.Aff.AVar
221246

247+
#### `monoidCanceler`
248+
249+
``` purescript
250+
instance monoidCanceler :: Monoid (Canceler e)
251+
```
222252

223-
A low-level primitive for building asynchronous code.
253+
254+
255+
## Module Control.Monad.Aff.AVar
224256

225257
#### `AVAR`
226258

@@ -313,10 +345,6 @@ instance monadAffAff :: MonadAff e (Aff e)
313345

314346
## Module Control.Monad.Aff.Par
315347

316-
317-
A newtype over `Aff` that provides `Applicative` instances that run in
318-
parallel.
319-
320348
#### `Par`
321349

322350
``` purescript

0 commit comments

Comments
 (0)