LanguageExt.Core

LanguageExt.Core Monads

Not all of the monadic types are in this section, but most of them are. The other monadic types are the collections, and the effect-system monads of Aff, Eff, and Proxy.

Contents

Sub modules

Alternative Value Monads
ContT
Free
Identity
IdentityT
Lifting
Monadic conditionals
Pure and Fail
Resources
State and Environment Monads

class Prelude Source #

Methods

method Identity<A> Id <A> (A value) Source #

Construct identity monad

method Pure<A> Pure <A> (A value) Source #

Create a new Pure monad. This monad doesn't do much, but when combined with other monads, it allows for easier construction of pure lifted values.

There are various bind operators that make it work with these types:

* Option
* Eff
* Either
* Fin
* IO
* Validation

Parameters

type A

Bound value type

param value

Value to lift

returns

Pure monad

method Fail<E> Fail <E> (E error) Source #

Create a new Fail monad: the monad that always fails. This monad doesn't do much, but when combined with other monads, it allows for easier construction of lifted failure values.

There are various bind operators that make it work with these types:

* Option
* Eff
* Either
* Fin
* IO
* Validation

Parameters

type A

Bound value type

param value

Value to lift

returns

Pure monad

method K<T, A> liftIO <T, M, A> (IO<A> ma) Source #

where T : MonadT<T, M>
where M : Monad<M>

Lift the IO monad into a transformer-stack with an IO as its innermost monad.