- Prelude
- unitEff = Pure(unit)
- timeout <A> (TimeSpan timeout, Eff<A> ma)
- SuccessEff <A> (A value)
- FailEff <A> (Error error)
- localCancel <A> (Eff<A> ma)
- cancelTokenEff
- flatten <A> (Eff<Eff<A>> mma)
- liftEff (Action action)
- liftEff <A> (Func<A> f)
- liftEff <A> (Func<Either<Error, A>> f)
- liftEff <A> (Func<Fin<A>> f)
- liftEff <A> (Func<MinRT, Either<Error, A>> f)
- liftEff <A> (Func<MinRT, A> f)
- liftEff <A> (Func<MinRT, Fin<A>> f)
- liftEff <A> (Func<MinRT, Task<A>> f)
- liftEff <A> (Func<MinRT, Task<Fin<A>>> f)
- liftEff <A> (Func<Task<A>> f)
- liftEff <A> (Func<Task<Fin<A>>> f)
- map <A, B> (Eff<A> ma, Func<A, B> f)
- mapFail <A> (Eff<A> ma, Func<Error, Error> f)
- bimap <A, B> (Eff<A> ma, Func<A, B> Succ, Func<Error, Error> Fail)
- match <A, B> (Eff<A> ma, Func<A, B> Succ, Func<Error, B> Fail)
- ifFail <A> (Eff<A> ma, Func<Error, A> Fail)
- ifFailEff <A> (Eff<A> ma, Func<Error, Eff<A>> Fail)
- filter <A> (Eff<A> ma, Func<A, bool> predicate)
- EffMaybe <A> (Func<Fin<A>> f)
- Eff <A> (Func<A> f)
- Prelude
field Eff<Unit> unitEff = Pure(unit) Source #
Effect that always returns unit
.
property Eff<CancellationToken> cancelTokenEff Source #
Cancellation token
returns | CancellationToken |
method Eff<A> timeout <A> (TimeSpan timeout, Eff<A> ma) Source #
Timeout operation if it takes too long
method Eff<A> SuccessEff <A> (A value) Source #
Construct an successful effect with a pure value
type | A | Bound value type |
param | value | Pure value to construct the monad with |
returns | Synchronous IO monad that captures the pure value |
method Eff<A> FailEff <A> (Error error) Source #
Construct a failed effect
type | A | Bound value type |
param | error | Error that represents the failure |
returns | Synchronous IO monad that captures the failure |
method Eff<A> localCancel <A> (Eff<A> ma) Source #
Create a new cancellation context and run the provided Aff in that context
type | A | Bound value type |
param | ma | Operation to run in the next context |
returns | An asynchronous effect that captures the operation running in context |
method Eff<A> flatten <A> (Eff<Eff<A>> mma) Source #
Monadic join operator
Collapses a nested IO monad so there is no nesting.
type | RT | Runtime |
type | E | Error type |
type | A | Bound value |
param | mma | Nest IO monad to flatten |
returns | Flattened IO monad |
method Eff<A> liftEff <A> (Func<Either<Error, A>> f) Source #
Lift a synchronous effect into the IO monad
method Eff<A> liftEff <A> (Func<MinRT, Either<Error, A>> f) Source #
Lift a synchronous effect into the IO monad
method Eff<A> liftEff <A> (Func<MinRT, Fin<A>> f) Source #
Lift a synchronous effect into the IO monad
method Eff<A> liftEff <A> (Func<MinRT, Task<A>> f) Source #
Lift a asynchronous effect into the IO monad
method Eff<A> liftEff <A> (Func<MinRT, Task<Fin<A>>> f) Source #
Lift a asynchronous effect into the IO monad
method Eff<A> liftEff <A> (Func<Task<Fin<A>>> f) Source #
Lift a asynchronous effect into the IO monad
method Eff<B> map <A, B> (Eff<A> ma, Func<A, B> f) Source #
Maps the IO monad if it's in a success state
param | f | Function to map the success value with |
returns | Mapped IO monad |
method Eff<A> mapFail <A> (Eff<A> ma, Func<Error, Error> f) Source #
Maps the IO monad if it's in a success state
param | f | Function to map the success value with |
returns | Mapped IO monad |
method Eff<B> bimap <A, B> (Eff<A> ma, Func<A, B> Succ, Func<Error, Error> Fail) Source #
Mapping of either the Success state or the Failure state depending on what state this IO monad is in.
param | Succ | Mapping to use if the IO monad is in a success state |
param | Fail | Mapping to use if the IO monad is in a failure state |
returns | Mapped IO monad |
method Eff<B> match <A, B> (Eff<A> ma, Func<A, B> Succ, Func<Error, B> Fail) Source #
Pattern match the success or failure values and collapse them down to a success value
param | Succ | Success value mapping |
param | Fail | Failure value mapping |
returns | IO in a success state |
method Eff<A> ifFail <A> (Eff<A> ma, Func<Error, A> Fail) Source #
Map the failure to a success value
param | f | Function to map the fail value |
returns | IO in a success state |
method Eff<A> ifFailEff <A> (Eff<A> ma, Func<Error, Eff<A>> Fail) Source #
Map the failure to a new IO effect
param | f | Function to map the fail value |
returns | IO that encapsulates that IfFail |
method Eff<A> filter <A> (Eff<A> ma, Func<A, bool> predicate) Source #
Only allow values through the effect if the predicate returns true
for the bound value
param | predicate | Predicate to apply to the bound value> |
returns | Filtered IO |
method Eff<B> map <A, B> (Func<A, B> f, K<Eff, A> ma) Source #
Functor map operation
Unwraps the value within the functor, passes it to the map function f
provided, and
then takes the mapped value and wraps it back up into a new functor.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method Eff<B> action <A, B> (K<Eff, A> ma, K<Eff, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method Eff<B> apply <A, B> (K<Eff, Func<A, B>> mf, K<Eff, A> ma) Source #
Applicative functor apply operation
Unwraps the value within the ma
applicative-functor, passes it to the unwrapped function(s) within mf
, and
then takes the resulting value and wraps it back up into a new applicative-functor.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |