File tree Expand file tree Collapse file tree 1 file changed +35
-7
lines changed Expand file tree Collapse file tree 1 file changed +35
-7
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,30 @@ A pure asynchronous computation, having no effects.
24
24
#### ` Canceler `
25
25
26
26
``` purescript
27
- type Canceler e = Error -> Aff e Boolean
27
+ newtype Canceler e
28
+ = Canceler (Error -> Aff e Boolean)
28
29
```
29
30
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.
30
51
31
52
#### ` launchAff `
32
53
@@ -216,11 +237,22 @@ instance monadPlusAff :: MonadPlus (Aff e)
216
237
```
217
238
218
239
240
+ #### ` semigroupCanceler `
241
+
242
+ ``` purescript
243
+ instance semigroupCanceler :: Semigroup (Canceler e)
244
+ ```
219
245
220
- ## Module Control.Monad.Aff.AVar
221
246
247
+ #### ` monoidCanceler `
248
+
249
+ ``` purescript
250
+ instance monoidCanceler :: Monoid (Canceler e)
251
+ ```
222
252
223
- A low-level primitive for building asynchronous code.
253
+
254
+
255
+ ## Module Control.Monad.Aff.AVar
224
256
225
257
#### ` AVAR `
226
258
@@ -313,10 +345,6 @@ instance monadAffAff :: MonadAff e (Aff e)
313
345
314
346
## Module Control.Monad.Aff.Par
315
347
316
-
317
- A newtype over ` Aff ` that provides ` Applicative ` instances that run in
318
- parallel.
319
-
320
348
#### ` Par `
321
349
322
350
``` purescript
You can’t perform that action at this time.
0 commit comments