An asynchronous computation with effects
e. The computation either
errors or produces a value of type
This is moral equivalent of
ErrorT (ContT Unit (Eff e)) a.
(Semigroup a) => Semigroup (Aff e a)
(Monoid a) => Monoid (Aff e a)
Functor (Aff e)
Apply (Aff e)
Applicative (Aff e)
Bind (Aff e)
Monad (Aff e)
MonadEff e (Aff e)
MonadThrow Error (Aff e)
Allows users to throw errors on the error channel of the asynchronous computation. See documentation in
MonadError Error (Aff e)
Allows users to catch errors on the error channel of the asynchronous computation. See documentation in
Alt (Aff e)
Plus (Aff e)
Alternative (Aff e)
MonadZero (Aff e)
MonadPlus (Aff e)
MonadRec (Aff e)
Parallel (ParAff e) (Aff e)
newtype Canceler e
A canceler is an asynchronous function that can be used to attempt the cancelation of a computation. Returns a boolean flag indicating whether or not the cancellation was successful. Many computations may be composite, in such cases the flag indicates whether any part of the computation was successfully canceled. The flag should not be used for communication.
Converts the asynchronous computation into a synchronous one. All values are ignored, and if the computation produces an error, it is thrown.
Catching exceptions by using
catchException with the resulting Eff
computation is not recommended, as exceptions may end up being thrown
asynchronously, in which case they cannot be caught.
If you do need to handle exceptions, you can use
runAff instead, or
you can handle the exception within the Aff computation, using
catchError (or any of the other mechanisms).
makeAff' :: forall a e. ((Error -> Eff e Unit) -> (a -> Eff e Unit) -> Eff e (Canceler e)) -> Aff e a
Creates an asynchronous effect from a function that accepts error and success callbacks, and returns a canceler for the computation. This function can be used for asynchronous computations that can be canceled.
newtype ParAff e a