LanguageExt.Core

LanguageExt.Core Monads Alternative Monads ValidationT

Contents

Sub modules

Extensions
Operators
Prelude
Trait

record ValidationT <F, M, A> (Func<MonoidInstance<F>, K<M, Validation<F, A>>> runValidation) Source #

where M : Monad<M>

ValidationT monad transformer, which allows for an optional result.

Parameters

type M

Given monad trait

type F

Left value type

type A

Bound value type

Methods

method K<M, Validation<F, A>> Run (MonoidInstance<F> monoid) Source #

method ValidationT<F, M1, B> MapT <M1, B> (Func<K<M, Validation<F, A>>, K<M1, Validation<F, B>>> f) Source #

where M1 : Monad<M1>

Maps the bound monad

Parameters

type M1

Target monad type

type B

Target bound value type

param f

Mapping function

returns

Mapped monad

method ValidationT<F, M, B> MapM <B> (Func<K<M, A>, K<M, B>> f) Source #

Maps the given monad

Parameters

param f

Mapping function

method ValidationT<F, M, B> Map <B> (Func<A, B> f) Source #

Maps the bound value

Parameters

type B

Target bound value type

param f

Mapping function

returns

ValidationT

method ValidationT<F, M, B> Select <B> (Func<A, B> f) Source #

Maps the bound value

Parameters

type B

Target bound value type

param f

Mapping transducer

returns

ValidationT

method ValidationT<F, M, B> Bind <B> (Func<A, K<ValidationT<F, M>, B>> f) Source #

Monad bind operation

Parameters

type B

Target bound value type

param f

Mapping function

returns

ValidationT

method ValidationT<F, M, B> Bind <B> (Func<A, ValidationT<F, M, B>> f) Source #

Monad bind operation

Parameters

type B

Target bound value type

param f

Mapping function

returns

ValidationT

method ValidationT<F, M, B> BiBind <B> (Func<A, ValidationT<F, M, B>> Succ, Func<F, ValidationT<F, M, B>> Fail) Source #

Monad bind operation

Parameters

type B

Target bound value type

param Succ

Success mapping function

param Fail

Failure mapping function

returns

ValidationT

method ValidationT<F, M, A> BindFail (Func<F, ValidationT<F, M, A>> Fail) Source #

Failure bind operation

Parameters

type B

Target bound value type

param Fail

Failure mapping function

returns

ValidationT

method ValidationT<F, M, B> Bind <B> (Func<A, IO<B>> f) Source #

Monad bind operation

Parameters

type B

Target bound value type

param f

Mapping function

returns

ValidationT

method ValidationT<F, M, B> Bind <B> (Func<A, Pure<B>> f) Source #

Monad bind operation

Parameters

type B

Target bound value type

param f

Mapping function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <B, C> (Func<A, K<ValidationT<F, M>, B>> bind, Func<A, B, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <B, C> (Func<A, ValidationT<F, M, B>> bind, Func<A, B, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <B, C> (Func<A, K<M, B>> bind, Func<A, B, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <B, C> (Func<A, Validation<F, B>> bind, Func<A, B, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <B, C> (Func<A, IO<B>> bind, Func<A, B, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

method ValidationT<F, M, C> SelectMany <C> (Func<A, Guard<F, Unit>> bind, Func<A, Unit, C> project) Source #

Monad bind operation

Parameters

type B

Intermediate bound value type

type C

Target bound value type

param bind

Monadic bind function

param project

Projection function

returns

ValidationT

Operators

operator & (ValidationT<F, M, A> ma, ValidationT<F, M, A> mb) Source #

class ValidationT Source #

Methods

method ValidationT<L, M, A> Success <L, M, A> (A value) Source #

where L : Monoid<L>
where M : Monad<M>

method ValidationT<L, M, A> Fail <L, M, A> (L value) Source #

where L : Monoid<L>
where M : Monad<M>

method ValidationT<L, M, A> lift <L, M, A> (Validation<L, A> ma) Source #

where L : Monoid<L>
where M : Monad<M>

method ValidationT<L, M, A> lift <L, M, A> (K<M, A> ma) Source #

where L : Monoid<L>
where M : Monad<M>

method ValidationT<L, M, A> lift <L, M, A> (Pure<A> ma) Source #

where L : Monoid<L>
where M : Monad<M>

method ValidationT<L, M, A> lift <L, M, A> (Fail<L> ma) Source #

where L : Monoid<L>
where M : Monad<M>

method ValidationT<L, M, A> liftIO <L, M, A> (IO<A> ma) Source #

where L : Monoid<L>
where M : MonadIO<M>

method K<M, B> match <F, M, A, B> (K<ValidationT<F, M>, A> ma, Func<F, B> Fail, Func<A, B> Succ) Source #

where F : Monoid<F>
where M : Monad<M>