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 IO
, Eff
, StreamT
, and Proxy
.
Sub modules
Alternative Monads |
ContT |
Free |
Identity |
IdentityT |
Lifting |
Monadic conditionals |
Pure and Fail |
State and Environment Monads |
Trampoline |
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
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
type | A | Bound value type |
param | value | Value to lift |
returns | Pure monad |
method K<F, A> pure <F, A> (A value) Source #
Construct an applicative structure from a pure value
type | A | Bound value type |
param | value | Pure value to lift into the applicative structure |
returns | Applicative structure |
method K<F, A> fail <E, F, A> (E error) Source #
Construct a structure F
in a failed state
type | E | Error type |
type | F | Structure to construct |
type | A | Bound value type |
param | error | Failure value |
returns |
|
method K<F, Unit> fail <E, F> (E error) Source #
Construct a structure F
in a failed state
type | E | Error type |
type | F | Structure to construct |
param | error | Failure value |
returns |
|