- ReaderT <Env, M, A> (Func<Env, K<M, A>> runReader)
- Pure (A value)
- Asks (Func<Env, A> f)
- AsksM (Func<Env, K<M, A>> f)
- Lift (Pure<A> monad)
- Lift (K<M, A> monad)
- Lift (Func<A> f)
- LiftIO (IO<A> ma)
- With <Env1> (Func<Env1, Env> f)
- Local (Func<Env, Env> f)
- MapM <M1, B> (Func<K<M, A>, K<M1, B>> f)
- Map <B> (Func<A, B> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, K<ReaderT<Env, M>, B>> f)
- Bind <B> (Func<A, ReaderT<Env, M, B>> f)
- Bind <B> (Func<A, Ask<Env, B>> f)
- Bind <B> (Func<A, IO<B>> f)
- SelectMany <B, C> (Func<A, K<ReaderT<Env, M>, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, ReaderT<Env, M, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, K<M, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, Ask<Env, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, IO<B>> bind, Func<A, B, C> project)
- >> (ReaderT<Env, M, A> lhs, ReaderT<Env, M, A> rhs)
- >> (ReaderT<Env, M, A> lhs, K<ReaderT<Env, M>, A> rhs)
- >> (ReaderT<Env, M, A> lhs, ReaderT<Env, M, Unit> rhs)
- >> (ReaderT<Env, M, A> lhs, K<ReaderT<Env, M>, Unit> rhs)
- | (ReaderT<Env, M, A> ma, ReaderT<Env, M, A> mb)
- | (ReaderT<Env, M, A> ma, Pure<A> mb)
- | (ReaderT<Env, M, A> ma, Ask<Env, A> mb)
- | (Ask<Env, A> ma, ReaderT<Env, M, A> mb)
- | (ReaderT<Env, M, A> ma, IO<A> mb)
- | (IO<A> ma, ReaderT<Env, M, A> mb)
- + (ReaderT<Env, M, A> ma, ReaderT<Env, M, A> mb)
- + (ReaderT<Env, M, A> ma, Pure<A> mb)
- + (ReaderT<Env, M, A> ma, Ask<Env, A> mb)
- + (Ask<Env, A> ma, ReaderT<Env, M, A> mb)
- + (ReaderT<Env, M, A> ma, IO<A> mb)
- + (IO<A> ma, ReaderT<Env, M, A> mb)
- Run (Env env)
- ReaderTExtensions
- As <Env, M, A> (this K<ReaderT<Env, M>, A> ma)
- Run <Env, M, A> (this K<ReaderT<Env, M>, A> ma, Env env)
- Flatten <Env, M, A> (this ReaderT<Env, M, ReaderT<Env, M, A>> mma)
- Flatten <Env, M, A> (this ReaderT<Env, M, K<ReaderT<Env, M>, A>> mma)
- SelectMany <Env, M, A, B, C> ( this K<M, A> ma, Func<A, K<ReaderT<Env, M>, B>> bind, Func<A, B, C> project)
- SelectMany <Env, M, A, B, C> ( this K<M, A> ma, Func<A, ReaderT<Env, M, B>> bind, Func<A, B, C> project)
- ReaderTExtensions
- Map <Env, M, A, B> (this Func<A, B> f, K<ReaderT<Env, M>, A> ma)
- Map <Env, M, A, B> (this Func<A, B> f, ReaderT<Env, M, A> ma)
- Action <Env, M, A, B> (this ReaderT<Env, M, A> ma, K<ReaderT<Env, M>, B> mb)
- Action <Env, M, A, B> (this K<ReaderT<Env, M>, A> ma, K<ReaderT<Env, M>, B> mb)
- Apply <Env, M, A, B> (this ReaderT<Env, M, Func<A, B>> mf, K<ReaderT<Env, M>, A> ma)
- Apply <Env, M, A, B> (this K<ReaderT<Env, M>, Func<A, B>> mf, K<ReaderT<Env, M>, A> ma)
- ReaderT <Env>
- ReaderT <Env, M>
- ReaderT
- pure <Env, M, A> (A value)
- lift <Env, M, A> (K<M, A> ma)
- liftIO <Env, M, A> (IO<A> effect)
- ask <M, Env> ()
- asks <M, A, Env> (Func<Env, A> f)
- asksM <M, Env, A> (Func<Env, K<M, A>> f)
- local <Env, M, A> (Func<Env, Env> f, ReaderT<Env, M, A> ma)
- with <Env, SubEnv, M, A> (Func<Env, SubEnv> f, ReaderT<SubEnv, M, A> ma)
- ReaderT <Env, M>
- Prelude
record ReaderT <Env, M, A> (Func<Env, K<M, A>> runReader) Source #
ReaderT
monad transformer, which adds a static environment to a given monad.
type | Env | Reader environment type |
type | M | Given monad trait |
type | A | Bound value type |
param | runReader | Transducer that represents the transformer operation |
method ReaderT<Env, M, A> Pure (A value) Source #
Lift a pure value into the monad-transformer
param | value | Value to lift |
returns |
|
method ReaderT<Env, M, A> Asks (Func<Env, A> f) Source #
Extracts the environment value and maps it to the bound value
param | f | Environment mapping function |
returns |
|
method ReaderT<Env, M, A> AsksM (Func<Env, K<M, A>> f) Source #
Extracts the environment value and maps it to the bound value
param | f | Environment mapping function |
returns |
|
method ReaderT<Env, M, A> Lift (Pure<A> monad) Source #
Lifts a given monad into the transformer
param | monad | Monad to lift |
returns |
|
method ReaderT<Env, M, A> Lift (K<M, A> monad) Source #
Lifts a given monad into the transformer
param | monad | Monad to lift |
returns |
|
method ReaderT<Env, M, A> Lift (Func<A> f) Source #
Lifts a unit function into the transformer
param | f | Function to lift |
returns |
|
method ReaderT<Env, M, A> LiftIO (IO<A> ma) Source #
Lifts a unit function into the transformer
param | f | Function to lift |
returns |
|
method ReaderT<Env1, M, A> With <Env1> (Func<Env1, Env> f) Source #
Maps the Reader's environment value
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, A> Local (Func<Env, Env> f) Source #
Maps the Reader's environment value
param | f | Mapping function |
returns |
|
method ReaderT<Env, M1, B> MapM <M1, B> (Func<K<M, A>, K<M1, B>> f) Source #
Maps the given monad
type | M1 | Trait of the monad to map to |
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, B> Map <B> (Func<A, B> f) Source #
Maps the bound value
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, B> Select <B> (Func<A, B> f) Source #
Maps the bound value
type | B | Target bound value type |
param | f | Mapping transducer |
returns |
|
method ReaderT<Env, M, B> Bind <B> (Func<A, K<ReaderT<Env, M>, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, B> Bind <B> (Func<A, ReaderT<Env, M, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, B> Bind <B> (Func<A, Ask<Env, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, B> Bind <B> (Func<A, IO<B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method ReaderT<Env, M, C> SelectMany <B, C> (Func<A, K<ReaderT<Env, M>, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method ReaderT<Env, M, C> SelectMany <B, C> (Func<A, ReaderT<Env, M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method ReaderT<Env, M, C> SelectMany <B, C> (Func<A, K<M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method ReaderT<Env, M, C> SelectMany <B, C> (Func<A, Pure<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method ReaderT<Env, M, C> SelectMany <B, C> (Func<A, Ask<Env, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method ReaderT<Env, M, C> SelectMany <B, C> (Func<A, IO<B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
operator >> (ReaderT<Env, M, A> lhs, ReaderT<Env, M, A> rhs) Source #
Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in C#.
param | lhs | First action to run |
param | rhs | Second action to run |
returns | Result of the second action |
operator >> (ReaderT<Env, M, A> lhs, K<ReaderT<Env, M>, A> rhs) Source #
Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in C#.
param | lhs | First action to run |
param | rhs | Second action to run |
returns | Result of the second action |
operator >> (ReaderT<Env, M, A> lhs, ReaderT<Env, M, Unit> rhs) Source #
Sequentially compose two actions. The second action is a unit returning action, so the result of the first action is propagated.
param | lhs | First action to run |
param | rhs | Second action to run |
returns | Result of the first action |
operator >> (ReaderT<Env, M, A> lhs, K<ReaderT<Env, M>, Unit> rhs) Source #
Sequentially compose two actions. The second action is a unit returning action, so the result of the first action is propagated.
param | lhs | First action to run |
param | rhs | Second action to run |
returns | Result of the first action |
class ReaderTExtensions Source #
Reader monad extensions
method ReaderT<Env, M, A> As <Env, M, A> (this K<ReaderT<Env, M>, A> ma) Source #
method K<M, A> Run <Env, M, A> (this K<ReaderT<Env, M>, A> ma, Env env) Source #
Run the reader monad
param | env | Input environment |
returns | Bound monad |
method ReaderT<Env, M, A> Flatten <Env, M, A> (this ReaderT<Env, M, ReaderT<Env, M, A>> mma) Source #
Monadic join
method ReaderT<Env, M, A> Flatten <Env, M, A> (this ReaderT<Env, M, K<ReaderT<Env, M>, A>> mma) Source #
Monadic join
method ReaderT<Env, M, C> SelectMany <Env, M, A, B, C> ( this K<M, A> ma, Func<A, K<ReaderT<Env, M>, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
method ReaderT<Env, M, C> SelectMany <Env, M, A, B, C> ( this K<M, A> ma, Func<A, ReaderT<Env, M, B>> bind, Func<A, B, C> project) Source #
Monad bind operation
type | B | Intermediate bound value type |
type | C | Target bound value type |
param | bind | Monadic bind function |
param | project | Projection function |
returns |
|
class ReaderTExtensions Source #
method ReaderT<Env, M, B> Map <Env, M, A, B> (this Func<A, B> f, K<ReaderT<Env, M>, 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.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method ReaderT<Env, M, B> Map <Env, M, A, B> (this Func<A, B> f, ReaderT<Env, M, 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.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method ReaderT<Env, M, B> Action <Env, M, A, B> (this ReaderT<Env, M, A> ma, K<ReaderT<Env, M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method ReaderT<Env, M, B> Action <Env, M, A, B> (this K<ReaderT<Env, M>, A> ma, K<ReaderT<Env, M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method ReaderT<Env, M, B> Apply <Env, M, A, B> (this ReaderT<Env, M, Func<A, B>> mf, K<ReaderT<Env, M>, 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.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |
method ReaderT<Env, M, B> Apply <Env, M, A, B> (this K<ReaderT<Env, M>, Func<A, B>> mf, K<ReaderT<Env, M>, 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.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |
MonadReaderT
trait implementation for ReaderT
type | Env | Reader environment type |
type | M | Given monad trait |
class ReaderT <Env, M> Source #
MonadReaderT
trait implementation for ReaderT
type | Env | Reader environment type |
type | M | Given monad trait |
MonadReaderT
trait implementation for ReaderT
type | Env | Reader environment type |
type | M | Given monad trait |
method ReaderT<Env, M, A> liftIO <Env, M, A> (IO<A> effect) Source #
Lifts a given monad into the transformer
param | effect | Monad to lift |
returns |
|
method ReaderT<Env, M, A> asksM <M, Env, A> (Func<Env, K<M, A>> f) Source #
class ReaderT <Env, M> Source #
MonadReaderT
trait implementation for ReaderT
type | Env | Reader environment type |
type | M | Given monad trait |
method ReaderT<Env, M, B> map <Env, M, A, B> (Func<A, B> f, K<ReaderT<Env, M>, 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.
param | ma | Functor to map |
param | f | Mapping function |
returns | Mapped functor |
method ReaderT<Env, M, B> action <Env, M, A, B> (K<ReaderT<Env, M>, A> ma, K<ReaderT<Env, M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method ReaderT<Env, M, B> apply <Env, M, A, B> (K<ReaderT<Env, M>, Func<A, B>> mf, K<ReaderT<Env, M>, 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.
param | ma | Value(s) applicative functor |
param | mf | Mapping function(s) |
returns | Mapped applicative functor |