LanguageExt.Core

LanguageExt.Core Effects Eff Eff with runtime Extensions

Contents

class EffExtensions Source #

Methods

method Eff<RT, A> As <RT, A> (this K<Eff<RT>, A> ma) Source #

Cast type to its Kind

method Fin<A> Run <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect

Returns the result value only

method Fin<A> Run <RT, A> (this K<Eff<RT>, A> ma, RT env, EnvIO envIO) Source #

Invoke the effect

Returns the result value only

method A RunUnsafe <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method A RunUnsafe <RT, A> (this K<Eff<RT>, A> ma, RT env, EnvIO envIO) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method IO<A> RunIO <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect to leave the inner IO monad

method Task<Fin<A>> RunAsync <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect

Returns the result value only

method Task<Fin<A>> RunAsync <RT, A> (this K<Eff<RT>, A> ma, RT env, EnvIO envIO) Source #

Invoke the effect

Returns the result value only

method ValueTask<A> RunUnsafeAsync <RT, A> (this K<Eff<RT>, A> ma, RT env) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method ValueTask<A> RunUnsafeAsync <RT, A> (this K<Eff<RT>, A> ma, RT env, EnvIO envIO) Source #

Invoke the effect

This is labelled 'unsafe' because it can throw an exception, whereas Run will capture any errors and return a Fin type.

method Eff<RT, A> Flatten <RT, A> (this K<Eff<RT>, Eff<RT, A>> mma) Source #

Monadic join operator

Collapses a nested IO monad so there is no nesting.

Parameters

type RT

Runtime

type A

Bound value

param mma

Nest IO monad to flatten

returns

Flattened IO monad

method Eff<RT, A> Flatten <RT, A> (this K<Eff<RT>, K<Eff<RT>, A>> mma) Source #

Monadic join operator

Collapses a nested IO monad so there is no nesting.

Parameters

type RT

Runtime

type A

Bound value

param mma

Nest IO monad to flatten

returns

Flattened IO monad

method Eff<RT, D> SelectMany <RT, A, B, C, D> ( this (K<Eff<RT>, A> First, K<Eff<RT>, B> Second) self, Func<(A First, B Second), K<Eff<RT>, C>> bind, Func<(A First, B Second), C, D> project) Source #

Monadic bind and project with paired IO monads

method Eff<RT, D> SelectMany <RT, A, B, C, D> ( this K<Eff<RT>, A> self, Func<A, (K<Eff<RT>, B> First, K<Eff<RT>, C> Second)> bind, Func<A, (B First, C Second), D> project) Source #

Monadic bind and project with paired IO monads

method Eff<RT, E> SelectMany <RT, A, B, C, D, E> ( this (K<Eff<RT>, A> First, K<Eff<RT>, B> Second, K<Eff<RT>, C> Third) self, Func<(A First, B Second, C Third), K<Eff<RT>, D>> bind, Func<(A First, B Second, C Third), D, E> project) Source #

Monadic bind and project with paired IO monads

method Eff<RT, E> SelectMany <RT, A, B, C, D, E> ( this K<Eff<RT>, A> self, Func<A, (K<Eff<RT>, B> First, K<Eff<RT>, C> Second, K<Eff<RT>, D> Third)> bind, Func<A, (B First, C Second, D Third), E> project) Source #

Monadic bind and project with paired IO monads

class EffExtensions Source #

Methods

method Eff<RT, B> Map <RT, A, B> (this Func<A, B> f, K<Eff<RT>, 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.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method Eff<RT, B> Map <RT, A, B> (this Func<A, B> f, Eff<RT, 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.

Parameters

param ma

Functor to map

param f

Mapping function

returns

Mapped functor

method Eff<RT, B> Action <RT, A, B> ( this Eff<RT, A> ma, Eff<RT, B> mb) Source #

Applicative action: runs the first applicative, ignores the result, and returns the second applicative

method Eff<RT, B> Apply <RT, A, B> (this Eff<RT, Func<A, B>> mf, K<Eff<RT>, 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.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor

method Eff<RT, B> Apply <RT, A, B> (this K<Eff<RT>, Func<A, B>> mf, K<Eff<RT>, 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.

Parameters

param ma

Value(s) applicative functor

param mf

Mapping function(s)

returns

Mapped applicative functor