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.
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
You can’t perform that action at this time.
0 commit comments