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
1717 , bracket
1818 , generalBracket
1919 , delay
20+ , never
2021 , finally
2122 , atomically
2223 , killFiber
@@ -226,6 +227,10 @@ spawnSuspendedAff = liftEff <<< launchSuspendedAff
226227delay ∷ ∀ eff . Milliseconds → Aff eff Unit
227228delay (Milliseconds n) = Fn .runFn2 _delay Right n
228229
230+ -- | An async computation which does not resolve.
231+ never ∷ ∀ eff a . Aff eff a
232+ never = makeAff \_ → pure mempty
233+
229234-- | All `Eff` exceptions are implicitly caught within an `Aff` context, but
230235-- | standard `liftEff` won't remove the effect label.
231236liftEff' ∷ ∀ eff a . Eff (exception ∷ EXCEPTION | eff ) a → Aff eff a
@@ -271,7 +276,9 @@ type BracketConditions eff a =
271276 , completed ∷ a → Aff eff Unit
272277 }
273278
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.
275282foreign import generalBracket ∷ ∀ eff a b . Aff eff a → BracketConditions eff a → (a → Aff eff b ) → Aff eff b
276283
277284-- | Constructs an `Aff` from low-level `Eff` effects using a callback. A
You can’t perform that action at this time.
0 commit comments