LanguageExt.Core

LanguageExt.Core Effects Aff Prelude

Contents

class Prelude Source #

Methods

method AffCatch<RT, A> @catch <RT, A> (Error error, Func<Error, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if the error matches the argument provided

method AffCatch<A> @catch <A> (Error error, Func<Error, Aff<A>> Fail) Source #

Catch an error if the error matches the argument provided

method AffCatch<RT, A> @catch <RT, A> (Error error, Aff<RT, A> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if the error matches the argument provided

method AffCatch<A> @catch <A> (Error error, Aff<A> Fail) Source #

Catch an error if the error matches the argument provided

method AffCatch<RT, A> @catch <RT, A> (int errorCode, Func<Error, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if the error Code matches the errorCode argument provided

method AffCatch<A> @catch <A> (int errorCode, Func<Error, Aff<A>> Fail) Source #

Catch an error if the error Code matches the errorCode argument provided

method AffCatch<RT, A> @catch <RT, A> (string errorText, Aff<RT, A> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if the error message matches the errorText argument provided

method AffCatch<A> @catch <A> (string errorText, Aff<A> Fail) Source #

Catch an error if the error message matches the errorText argument provided

method AffCatch<RT, A> @catch <RT, A> (int errorCode, Aff<RT, A> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if the error Code matches the errorCode argument provided

method AffCatch<A> @catch <A> (int errorCode, Aff<A> Fail) Source #

Catch an error if the error Code matches the errorCode argument provided

method AffCatch<RT, A> @catch <RT, A> (string errorText, Func<Error, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if the error message matches the errorText argument provided

method AffCatch<A> @catch <A> (string errorText, Func<Error, Aff<A>> Fail) Source #

Catch an error if the error message matches the errorText argument provided

method AffCatch<A> @catch <A> (Func<Exception, bool> predicate, Func<Exception, Aff<A>> Fail) Source #

Catch an error if it's of a specific exception type

method AffCatch<A> @catch <A> (Func<Exception, bool> predicate, Aff<A> Fail) Source #

Catch an error if it's of a specific exception type

method AffCatch<RT, A> @catch <RT, A> (Func<Exception, bool> predicate, Func<Exception, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if it's of a specific exception type

method AffCatch<RT, A> @catch <RT, A> (Func<Exception, bool> predicate, Aff<RT, A> Fail) Source #

where RT : struct, HasCancel<RT>

Catch an error if it's of a specific exception type

method AffCatch<RT, A> @catch <RT, A> (Aff<RT, A> Fail) Source #

where RT : struct, HasCancel<RT>

Catch all errors

method AffCatch<A> @catch <A> (Aff<A> Fail) Source #

Catch all errors

method AffCatch<RT, A> @catch <RT, A> (Func<Error, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch all errors

method AffCatch<A> @catch <A> (Func<Error, Aff<A>> Fail) Source #

Catch all errors

method AffCatch<A> @catchOf <E, A> (Func<E, Aff<A>> Fail) Source #

where E : Error

Catch errors

method AffCatch<RT, A> @catchOf <RT, E, A> (Func<E, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>
where E : Error

Catch errors

method AffCatch<A> @expected <A> (Func<Expected, Aff<A>> Fail) Source #

Catch expected errors

method AffCatch<RT, A> @expected <RT, A> (Func<Expected, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch expected errors

method AffCatch<A> @expectedOf <E, A> (Func<E, Aff<A>> Fail) Source #

where E : Expected

Catch expected errors

method AffCatch<RT, A> @expectedOf <RT, E, A> (Func<E, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>
where E : Expected

Catch expected errors

method AffCatch<A> @exceptional <A> (Func<Exceptional, Aff<A>> Fail) Source #

Catch exceptional errors

method AffCatch<RT, A> @exceptional <RT, A> (Func<Exceptional, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>

Catch exceptional errors

method AffCatch<A> @exceptionalOf <E, A> (Func<E, Aff<A>> Fail) Source #

where E : Exceptional

Catch exceptional errors

method AffCatch<RT, A> @exceptionalOf <RT, E, A> (Func<E, Aff<RT, A>> Fail) Source #

where RT : struct, HasCancel<RT>
where E : Exceptional

Catch exceptional errors

class Prelude Source #

Fields

field Aff<Unit> unitAff = SuccessEff(unit) Source #

Unit effect

Always succeeds with a Unit value

field Aff<bool> trueAff = SuccessEff(true) Source #

True effect

Always succeeds with a boolean true value

field Aff<bool> falseAff = SuccessEff(false) Source #

False effect

Always succeeds with a boolean false value

Methods

method Aff<RT, A> AffMaybe <RT, A> (Func<RT, ValueTask<Fin<A>>> f) Source #

where RT : struct, HasCancel<RT>

Construct an effect that will either succeed, have an exceptional, or unexceptional failure

Parameters

type A

Bound value type

param f

Function to capture the effect

returns

Asynchronous IO monad that captures the effect

method Aff<A> AffMaybe <A> (Func<ValueTask<Fin<A>>> f) Source #

Construct an effect that will either succeed, have an exceptional, or unexceptional failure

Parameters

type A

Bound value type

param f

Function to capture the effect

returns

Asynchronous IO monad that captures the effect

method Aff<RT, A> Aff <RT, A> (Func<RT, ValueTask<A>> f) Source #

where RT : struct, HasCancel<RT>

Construct an effect that will either succeed or have an exceptional failure

Parameters

type A

Bound value type

param f

Function to capture the effect

returns

Asynchronous IO monad that captures the effect

method Aff<A> Aff <A> (Func<ValueTask<A>> f) Source #

Construct an effect that will either succeed or have an exceptional failure

Parameters

type A

Bound value type

param f

Function to capture the effect

returns

Asynchronous IO monad that captures the effect

method Aff<A> SuccessAff <A> (A value) Source #

Construct an successful effect with a pure value

Parameters

type A

Bound value type

param value

Pure value to construct the monad with

returns

Asynchronous IO monad that captures the pure value

method Aff<RT, A> SuccessAff <RT, A> (A value) Source #

where RT : struct, HasCancel<RT>

Construct an successful effect with a pure value

Parameters

type A

Bound value type

param value

Pure value to construct the monad with

returns

Asynchronous IO monad that captures the pure value

method Aff<A> FailAff <A> (Error error) Source #

Construct a failed effect

Parameters

type A

Bound value type

param error

Error that represents the failure

returns

Synchronous IO monad that captures the failure

method Aff<RT, A> FailAff <RT, A> (Error error) Source #

where RT : struct, HasCancel<RT>

Construct a failed effect

Parameters

type A

Bound value type

param error

Error that represents the failure

returns

Synchronous IO monad that captures the failure

method Aff<OuterRT, A> localAff <OuterRT, InnerRT, A> (Func<OuterRT, InnerRT> f, Aff<InnerRT, A> ma) Source #

where OuterRT : struct, HasCancel<OuterRT>
where InnerRT : struct, HasCancel<InnerRT>

Create a new local context for the environment by mapping the outer environment and then using the result as a new context when running the IO monad provided

Parameters

param f

Function to map the outer environment into a new one to run ma

param ma

IO monad to run in the new context

method Eff<RT, RT> runtime <RT> () Source #

where RT : struct

Runtime

method Eff<RT, Eff<Unit>> fork <RT, A> (Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Launch the async computation without awaiting the result

If the parent expression has cancel called on it, then it will also cancel the forked child expression.

Fork returns an Eff Unit as its bound result value. If you run it, it will cancel the forked child expression.

Parameters

returns

Returns an Eff Unit as its bound value. If it runs, it will cancel the forked child expression

method Eff<RT, Eff<Unit>> fork <RT, A> (Effect<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Launch the async computation without awaiting the result

If the parent expression has cancel called on it, then it will also cancel the forked child expression.

Fork returns an Eff Unit as its bound result value. If you run it, it will cancel the forked child expression.

Parameters

returns

Returns an Eff Unit as its bound value. If it runs, it will cancel the forked child expression

method Eff<Unit> fork <A> (Aff<A> ma) Source #

Launch the async computation without awaiting the result

method Aff<RT, A> localCancel <RT, A> (Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Create a new cancellation context and run the provided Aff in that context

Parameters

type RT

Runtime environment

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<RT, A> localCancel <RT, A> (Eff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Create a new cancellation context and run the provided Aff in that context

Parameters

type RT

Runtime environment

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 Aff<RT, Unit> cancel <RT> () Source #

where RT : struct, HasCancel<RT>

Cancel the asynchronous operation

Parameters

type RT

Runtime

returns

Unit

method Eff<RT, CancellationToken> cancelToken <RT> () Source #

where RT : struct, HasCancel<RT>

Cancellation token

Parameters

type RT

Runtime environment

returns

CancellationToken

method Eff<RT, CancellationTokenSource> cancelTokenSource <RT> () Source #

where RT : struct, HasCancel<RT>

Cancellation token source

Parameters

type RT

Runtime environment

returns

CancellationTokenSource

method Aff<RT, A> timeout <RT, A> (TimeSpan timeoutDelay, Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Force the operation to end after a time out delay

Parameters

param timeoutDelay

Delay for the time out

returns

Either success if the operation completed before the timeout, or Errors.TimedOut

method Aff<A> timeout <A> (TimeSpan timeoutDelay, Aff<A> ma) Source #

Force the operation to end after a time out delay

Note, the original operation continues even after this returns. To cancel the original operation at the same time as the timeout triggers, use Aff<RT, A> instead of Aff - as it supports cancellation tokens, and so can automatically cancel the long-running operation

Parameters

param timeoutDelay

Delay for the time out

returns

Either success if the operation completed before the timeout, or Errors.TimedOut

method Aff<RT, R> aff <RT, A, R> ( Aff<RT, A> ma, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Aff<RT, R> aff <RT, A, B, R> ( Aff<RT, A> ma, Aff<RT, B> mb, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Aff<RT, R> aff <RT, A, B, C, R> ( Aff<RT, A> ma, Aff<RT, B> mb, Aff<RT, C> mc, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Aff<RT, R> aff <RT, A, B, C, D, R> ( Aff<RT, A> ma, Aff<RT, B> mb, Aff<RT, C> mc, Aff<RT, D> md, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Aff<RT, R> aff <RT, A, B, C, D, E, R> ( Aff<RT, A> ma, Aff<RT, B> mb, Aff<RT, C> mc, Aff<RT, D> md, Aff<RT, E> me, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Aff<RT, R> aff <RT, A, B, C, D, E, F, R> ( Aff<RT, A> ma, Aff<RT, B> mb, Aff<RT, C> mc, Aff<RT, D> md, Aff<RT, E> me, Aff<RT, F> mf, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Aff<RT, R> aff <RT, A, B, C, D, E, F, G, R> ( Aff<RT, A> ma, Aff<RT, B> mb, Aff<RT, C> mc, Aff<RT, D> md, Aff<RT, E> me, Aff<RT, F> mf, Aff<RT, G> mg, Aff<RT, R> mr) Source #

where RT : struct, HasCancel<RT>

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, R> ( Eff<RT, A> ma, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, B, R> ( Eff<RT, A> ma, Eff<RT, B> mb, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, B, C, R> ( Eff<RT, A> ma, Eff<RT, B> mb, Eff<RT, C> mc, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, B, C, D, R> ( Eff<RT, A> ma, Eff<RT, B> mb, Eff<RT, C> mc, Eff<RT, D> md, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, B, C, D, E, R> ( Eff<RT, A> ma, Eff<RT, B> mb, Eff<RT, C> mc, Eff<RT, D> md, Eff<RT, E> me, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, B, C, D, E, F, R> ( Eff<RT, A> ma, Eff<RT, B> mb, Eff<RT, C> mc, Eff<RT, D> md, Eff<RT, E> me, Eff<RT, F> mf, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

method Eff<RT, R> eff <RT, A, B, C, D, E, F, G, R> ( Eff<RT, A> ma, Eff<RT, B> mb, Eff<RT, C> mc, Eff<RT, D> md, Eff<RT, E> me, Eff<RT, F> mf, Eff<RT, G> mg, Eff<RT, R> mr) Source #

where RT : struct

Sequentially run IO operations, returning the result of the last one

class Prelude Source #

Methods

method Aff<RT, S> fold <RT, S, A> (Schedule schedule, Aff<RT, A> ma, S state, Func<S, A, S> fold) Source #

where RT : struct, HasCancel<RT>

Fold over the effect repeatedly until the schedule expires or the effect fails

Parameters

type RT

Runtime

type S

State type

type A

Bound value type

param ma

Effect to fold over

param schedule

Scheduler that controls the number of folds and the delay between each fold iteration

param state

Initial state

param fold

Folder function

returns

The result of the fold operation

method Aff<RT, S> foldWhile <RT, S, A> (Schedule schedule, Aff<RT, A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

where RT : struct, HasCancel<RT>

Fold over the effect repeatedly until the schedule expires, the effect fails, or the predicate returns false

Parameters

type RT

Runtime

type S

State type

type A

Bound value type

param ma

Effect to fold over

param schedule

Scheduler that controls the number of folds and the delay between each fold iteration

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns false, the fold ends

returns

The result of the fold operation

method Aff<RT, S> foldUntil <RT, S, A> (Schedule schedule, Aff<RT, A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

where RT : struct, HasCancel<RT>

Fold over the effect repeatedly until the schedule expires, the effect fails, or the predicate returns true

Parameters

type RT

Runtime

type S

State type

type A

Bound value type

param ma

Effect to fold over

param schedule

Scheduler that controls the number of folds and the delay between each fold iteration

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns true, the fold ends

returns

The result of the fold operation

method Aff<RT, S> fold <RT, S, A> (Aff<RT, A> ma, S state, Func<S, A, S> fold) Source #

where RT : struct, HasCancel<RT>

Fold over the effect repeatedly until the effect fails

Parameters

type RT

Runtime

type S

State type

type A

Bound value type

param ma

Effect to fold over

param state

Initial state

param fold

Folder function

returns

The result of the fold operation

method Aff<RT, S> foldWhile <RT, S, A> (Aff<RT, A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

where RT : struct, HasCancel<RT>

Fold over the effect repeatedly until the effect fails or the predicate returns false

Parameters

type RT

Runtime

type S

State type

type A

Bound value type

param ma

Effect to fold over

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns false, the fold ends

returns

The result of the fold operation

method Aff<RT, S> foldUntil <RT, S, A> (Aff<RT, A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

where RT : struct, HasCancel<RT>

Fold over the effect repeatedly until the effect fails or the predicate returns true

Parameters

type RT

Runtime

type S

State type

type A

Bound value type

param ma

Effect to fold over

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns true, the fold ends

returns

The result of the fold operation

method Aff<S> fold <S, A> (Schedule schedule, Aff<A> ma, S state, Func<S, A, S> fold) Source #

Fold over the effect repeatedly until the schedule expires or the effect fails

Parameters

type S

State type

type A

Bound value type

param ma

Effect to fold over

param schedule

Scheduler that controls the number of folds and the delay between each fold iteration

param state

Initial state

param fold

Folder function

returns

The result of the fold operation

method Aff<S> foldWhile <S, A> (Schedule schedule, Aff<A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

Fold over the effect repeatedly until the schedule expires, the effect fails, or the predicate returns false

Parameters

type S

State type

type A

Bound value type

param ma

Effect to fold over

param schedule

Scheduler that controls the number of folds and the delay between each fold iteration

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns false, the fold ends

returns

The result of the fold operation

method Aff<S> foldUntil <S, A> (Schedule schedule, Aff<A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

Fold over the effect repeatedly until the schedule expires, the effect fails, or the predicate returns true

Parameters

type S

State type

type A

Bound value type

param ma

Effect to fold over

param schedule

Scheduler that controls the number of folds and the delay between each fold iteration

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns true, the fold ends

returns

The result of the fold operation

method Aff<S> fold <S, A> (Aff<A> ma, S state, Func<S, A, S> fold) Source #

Fold over the effect repeatedly until the effect fails

Parameters

type S

State type

type A

Bound value type

param ma

Effect to fold over

param state

Initial state

param fold

Folder function

returns

The result of the fold operation

method Aff<S> foldWhile <S, A> (Aff<A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

Fold over the effect repeatedly until the effect fails or the predicate returns false

Parameters

type S

State type

type A

Bound value type

param ma

Effect to fold over

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns false, the fold ends

returns

The result of the fold operation

method Aff<S> foldUntil <S, A> (Aff<A> ma, S state, Func<S, A, S> fold, Func<A, bool> pred) Source #

Fold over the effect repeatedly until the effect fails or the predicate returns true

Parameters

type S

State type

type A

Bound value type

param ma

Effect to fold over

param state

Initial state

param fold

Folder function

param pred

Predicate function - when this returns true, the fold ends

returns

The result of the fold operation

class Prelude Source #

Methods

method Aff<RT, A> repeat <RT, A> (Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Keeps repeating the computation until it fails

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

returns

The result of the last invocation of ma

method Aff<A> repeat <A> (Aff<A> ma) Source #

Keeps repeating the computation until it fails

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

returns

The result of the last invocation of ma

method Aff<RT, A> repeat <RT, A> (Schedule schedule, Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Keeps repeating the computation until it fails

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

param schedule

Scheduler strategy for repeating

returns

The result of the last invocation of ma

method Aff<A> repeat <A> (Schedule schedule, Aff<A> ma) Source #

Keeps repeating the computation until it fails

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

param schedule

Scheduler strategy for repeating

returns

The result of the last invocation of ma

method Aff<RT, A> repeatWhile <RT, A> (Aff<RT, A> ma, Func<A, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps repeating the computation until it fails or the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

returns

The result of the last invocation of ma

method Aff<A> repeatWhile <A> (Aff<A> ma, Func<A, bool> predicate) Source #

Keeps repeating the computation until it fails or the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

returns

The result of the last invocation of ma

method Aff<RT, A> repeatWhile <RT, A> (Schedule schedule, Aff<RT, A> ma, Func<A, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps repeating the computation until it fails or the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

param schedule

Scheduler strategy for repeating

returns

The result of the last invocation of ma

method Aff<A> repeatWhile <A> (Schedule schedule, Aff<A> ma, Func<A, bool> predicate) Source #

Keeps repeating the computation until it fails or the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

param schedule

Scheduler strategy for repeating

returns

The result of the last invocation of ma

method Aff<RT, A> repeatUntil <RT, A> (Aff<RT, A> ma, Func<A, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps repeating the computation until it fails or the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

returns

The result of the last invocation of ma

method Aff<A> repeatUntil <A> (Aff<A> ma, Func<A, bool> predicate) Source #

Keeps repeating the computation until it fails or the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

returns

The result of the last invocation of ma

method Aff<RT, A> repeatUntil <RT, A> (Schedule schedule, Aff<RT, A> ma, Func<A, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps repeating the computation until it fails or the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

param schedule

Scheduler strategy for repeating

returns

The result of the last invocation of ma

method Aff<A> repeatUntil <A> (Schedule schedule, Aff<A> ma, Func<A, bool> predicate) Source #

Keeps repeating the computation until it fails or the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to repeat

param schedule

Scheduler strategy for repeating

returns

The result of the last invocation of ma

class Prelude Source #

Methods

method Aff<RT, A> retry <RT, A> (Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Keeps retrying the computation

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

returns

The result of the last invocation of ma

method Aff<A> retry <A> (Aff<A> ma) Source #

Keeps retrying the computation

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

returns

The result of the last invocation of ma

method Aff<RT, A> retry <RT, A> (Schedule schedule, Aff<RT, A> ma) Source #

where RT : struct, HasCancel<RT>

Keeps retrying the computation, until the scheduler expires

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

param schedule

Scheduler strategy for retrying

returns

The result of the last invocation of ma

method Aff<A> retry <A> (Schedule schedule, Aff<A> ma) Source #

Keeps retrying the computation, until the scheduler expires

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

param schedule

Scheduler strategy for retrying

returns

The result of the last invocation of ma

method Aff<RT, A> retryWhile <RT, A> (Aff<RT, A> ma, Func<Error, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps retrying the computation until the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

returns

The result of the last invocation of ma

method Aff<A> retryWhile <A> (Aff<A> ma, Func<Error, bool> predicate) Source #

Keeps retrying the computation until the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

returns

The result of the last invocation of ma

method Aff<RT, A> retryWhile <RT, A> (Schedule schedule, Aff<RT, A> ma, Func<Error, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps retrying the computation, until the scheduler expires, or the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

param schedule

Scheduler strategy for retrying

returns

The result of the last invocation of ma

method Aff<A> retryWhile <A> (Schedule schedule, Aff<A> ma, Func<Error, bool> predicate) Source #

Keeps retrying the computation, until the scheduler expires, or the predicate returns false

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

param schedule

Scheduler strategy for retrying

returns

The result of the last invocation of ma

method Aff<RT, A> retryUntil <RT, A> (Aff<RT, A> ma, Func<Error, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps retrying the computation until the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

returns

The result of the last invocation of ma

method Aff<A> retryUntil <A> (Aff<A> ma, Func<Error, bool> predicate) Source #

Keeps retrying the computation until the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

returns

The result of the last invocation of ma

method Aff<RT, A> retryUntil <RT, A> (Schedule schedule, Aff<RT, A> ma, Func<Error, bool> predicate) Source #

where RT : struct, HasCancel<RT>

Keeps retrying the computation, until the scheduler expires, or the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

param schedule

Scheduler strategy for retrying

returns

The result of the last invocation of ma

method Aff<A> retryUntil <A> (Schedule schedule, Aff<A> ma, Func<Error, bool> predicate) Source #

Keeps retrying the computation, until the scheduler expires, or the predicate returns true

Parameters

type RT

Runtime

type A

Computation bound value type

param ma

Computation to retry

param schedule

Scheduler strategy for retrying

returns

The result of the last invocation of ma

class Prelude Source #

Methods

method Aff<R> use <H, R> (Aff<H> Acq, Func<H, Aff<R>> Use) Source #

where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<RT, R> use <RT, H, R> (Aff<H> Acq, Func<H, Aff<RT, R>> Use) Source #

where RT : struct, HasCancel<RT>
where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<R> use <H, R> (Aff<H> Acq, Func<H, Eff<R>> Use) Source #

where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<RT, R> use <RT, H, R> (Aff<H> Acq, Func<H, Eff<RT, R>> Use) Source #

where RT : struct, HasCancel<RT>
where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<RT, R> use <RT, H, R> (Aff<RT, H> Acq, Func<H, Aff<R>> Use) Source #

where RT : struct, HasCancel<RT>
where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<RT, R> use <RT, H, R> (Aff<RT, H> Acq, Func<H, Aff<RT, R>> Use) Source #

where RT : struct, HasCancel<RT>
where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<RT, R> use <RT, H, R> (Aff<RT, H> Acq, Func<H, Eff<R>> Use) Source #

where RT : struct, HasCancel<RT>
where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource

method Aff<RT, R> use <RT, H, R> (Aff<RT, H> Acq, Func<H, Eff<RT, R>> Use) Source #

where RT : struct, HasCancel<RT>
where H : IDisposable

Safely use a disposable resource

Parameters

param Acq

Acquire resource

param Use

Use resource