File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ module Control.Monad.Aff
17
17
, bracket
18
18
, generalBracket
19
19
, delay
20
+ , never
20
21
, finally
21
22
, atomically
22
23
, killFiber
@@ -226,6 +227,10 @@ spawnSuspendedAff = liftEff <<< launchSuspendedAff
226
227
delay ∷ ∀ eff . Milliseconds → Aff eff Unit
227
228
delay (Milliseconds n) = Fn .runFn2 _delay Right n
228
229
230
+ -- | An async computation which does not resolve.
231
+ never ∷ ∀ eff a . Aff eff a
232
+ never = makeAff \_ → pure mempty
233
+
229
234
-- | All `Eff` exceptions are implicitly caught within an `Aff` context, but
230
235
-- | standard `liftEff` won't remove the effect label.
231
236
liftEff' ∷ ∀ eff a . Eff (exception ∷ EXCEPTION | eff ) a → Aff eff a
@@ -271,7 +276,9 @@ type BracketConditions eff a =
271
276
, completed ∷ a → Aff eff Unit
272
277
}
273
278
274
- -- | A general purpose bracket
279
+ -- | A general purpose bracket which lets you observe the status of the
280
+ -- | bracketed action. The bracketed action may have been killed with an
281
+ -- | exception, thrown an exception, or completed successfully.
275
282
foreign import generalBracket ∷ ∀ eff a b . Aff eff a → BracketConditions eff a → (a → Aff eff b ) → Aff eff b
276
283
277
284
-- | Constructs an `Aff` from low-level `Eff` effects using a callback. A
You can’t perform that action at this time.
0 commit comments