- TryT <M, A> (K<M, Try<A>> runTry)
- Succ (A value)
- Fail (Error value)
- Lift (Pure<A> pure)
- Lift (Fin<A> result)
- Lift (Func<Fin<A>> result)
- Lift (Fail<Error> fail)
- Lift (K<M, A> monad)
- LiftIO (IO<A> monad)
- Match <B> (Func<A, B> Succ, Func<Error, B> Fail)
- IfFail (Func<Error, A> Fail)
- IfFailM (Func<Error, K<M, A>> Fail)
- MapT <M1, B> (Func<K<M, Fin<A>>, K<M1, Fin<B>>> f)
- Map <B> (Func<A, B> f)
- MapFail (Func<Error, Error> f)
- Select <B> (Func<A, B> f)
- Bind <B> (Func<A, K<TryT<M>, B>> f)
- Bind <B> (Func<A, TryT<M, B>> f)
- BiBind <B> (Func<A, TryT<M, B>> Succ, Func<Error, TryT<M, B>> Fail)
- BindFail (Func<Error, TryT<M, A>> Fail)
- Bind <B> (Func<A, IO<B>> f)
- Bind <B> (Func<A, Pure<B>> f)
- SelectMany <B, C> (Func<A, K<TryT<M>, B>> bind, Func<A, B, C> project)
- SelectMany <B, C> (Func<A, TryT<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, Fin<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, IO<B>> bind, Func<A, B, C> project)
- >> (TryT<M, A> lhs, TryT<M, A> rhs)
- >> (TryT<M, A> lhs, K<TryT<M>, A> rhs)
- >> (TryT<M, A> lhs, TryT<M, Unit> rhs)
- >> (TryT<M, A> lhs, K<TryT<M>, Unit> rhs)
- + (TryT<M, A> lhs, TryT<M, A> rhs)
- + (K<TryT<M>, A> lhs, TryT<M, A> rhs)
- + (TryT<M, A> lhs, K<TryT<M>, A> rhs)
- + (TryT<M, A> ma, Pure<A> mb)
- + (TryT<M, A> ma, Fail<Error> mb)
- + (TryT<M, A> ma, Fail<Exception> mb)
- | (TryT<M, A> lhs, TryT<M, A> rhs)
- | (K<TryT<M>, A> lhs, TryT<M, A> rhs)
- | (TryT<M, A> lhs, K<TryT<M>, A> rhs)
- | (TryT<M, A> ma, Pure<A> mb)
- | (TryT<M, A> ma, Fail<Error> mb)
- | (TryT<M, A> ma, Fail<Exception> mb)
- | (TryT<M, A> ma, CatchM<Error, TryT<M>, A> mb)
- Combine (TryT<M, A> rhs)
- TryTExtensions
- As <M, A> (this K<TryT<M>, A> ma)
- Run <M, A> (this K<TryT<M>, A> ma)
- Flatten <M, A> (this K<TryT<M>, TryT<M, A>> mma)
- Flatten <M, A> (this K<TryT<M>, K<TryT<M>, A>> mma)
- SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, K<TryT<M>, B>> bind, Func<A, B, C> project)
- SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, TryT<M, B>> bind, Func<A, B, C> project)
- TryTExtensions
- Map <M, A, B> (this Func<A, B> f, K<TryT<M>, A> ma)
- Map <M, A, B> (this Func<A, B> f, TryT<M, A> ma)
- Action <M, A, B> (this TryT<M, A> ma, K<TryT<M>, B> mb)
- Action <M, A, B> (this K<TryT<M>, A> ma, K<TryT<M>, B> mb)
- Apply <M, A, B> (this TryT<M, Func<A, B>> mf, K<TryT<M>, A> ma)
- Apply <M, A, B> (this K<TryT<M>, Func<A, B>> mf, K<TryT<M>, A> ma)
- TryT <M>
- Succ <A> (A value)
- Fail <A> (Error value)
- lift <A> (Func<Fin<A>> ma)
- lift <A> (Fin<A> ma)
- lift <A> (Pure<A> ma)
- lift <A> (Fail<Error> ma)
- lift <A> (Error ma)
- liftIO <A> (IO<A> ma)
- TryT
- Succ <M, A> (A value)
- Fail <M, A> (Error value)
- lift <M, A> (Func<Fin<A>> ma)
- lift <M, A> (Fin<A> ma)
- lift <M, A> (K<M, A> ma)
- lift <M, A> (Pure<A> ma)
- lift <M, A> (Fail<Error> ma)
- lift <M, A> (Error ma)
- liftIO <M, A> (IO<A> ma)
- match <M, A, B> (TryT<M, A> ma, Func<A, B> Succ, Func<Error, B> Fail)
- TryT <M>
- Prelude
record TryT <M, A> (K<M, Try<A>> runTry) Source #
TryT
monad transformer, which allows for an optional result.
type | M | Given monad trait |
type | A | Bound value type |
param | runEither | Transducer that represents the transformer operation |
method TryT<M, A> Succ (A value) Source #
Lift a pure value into the monad-transformer
param | value | Value to lift |
returns |
|
method TryT<M, A> Fail (Error value) Source #
Lift a fail value into the monad-transformer
param | value | Value to lift |
returns |
|
method TryT<M, A> Lift (Pure<A> pure) Source #
Lifts a given monad into the transformer
returns |
|
method TryT<M, A> Lift (Fin<A> result) Source #
Lifts a given monad into the transformer
returns |
|
method TryT<M, A> Lift (Func<Fin<A>> result) Source #
Lifts a given monad into the transformer
returns |
|
method TryT<M, A> Lift (Fail<Error> fail) Source #
Lifts a given monad into the transformer
param | fail | Monad to lift |
returns |
|
method TryT<M, A> Lift (K<M, A> monad) Source #
Lifts a given monad into the transformer
param | monad | Monad to lift |
returns |
|
method TryT<M, A> LiftIO (IO<A> monad) Source #
Lifts a given monad into the transformer
param | monad | Monad to lift |
returns |
|
method K<M, B> Match <B> (Func<A, B> Succ, Func<Error, B> Fail) Source #
Match the bound value and return a result (which gets packages back up inside the inner monad)
param | Succ | Success branch |
param | Fail | Fail branch |
returns | Inner monad with the result of the |
method K<M, A> IfFail (Func<Error, A> Fail) Source #
Match the bound value and return a result (which gets packages back up inside the inner monad)
param | Succ | Success branch |
param | Fail | Fail branch |
returns | Inner monad with the result of the |
method K<M, A> IfFailM (Func<Error, K<M, A>> Fail) Source #
Match the bound value and return a result (which gets packages back up inside the inner monad)
param | Succ | Success branch |
param | Fail | Fail branch |
returns | Inner monad with the result of the |
method TryT<M1, B> MapT <M1, B> (Func<K<M, Fin<A>>, K<M1, Fin<B>>> f) Source #
Maps the bound monad
type | M1 | Target monad type |
type | B | Target bound value type |
param | f | Mapping function |
returns | Mapped monad |
method TryT<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 TryT<M, A> MapFail (Func<Error, Error> f) Source #
Maps the bound value
param | f | Mapping function |
returns |
|
method TryT<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 TryT<M, B> Bind <B> (Func<A, K<TryT<M>, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method TryT<M, B> Bind <B> (Func<A, TryT<M, B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method TryT<M, B> BiBind <B> (Func<A, TryT<M, B>> Succ, Func<Error, TryT<M, B>> Fail) Source #
Monad bind operation
type | B | Target bound value type |
param | Succ | Success mapping function |
param | Fail | Failure mapping function |
returns |
|
method TryT<M, A> BindFail (Func<Error, TryT<M, A>> Fail) Source #
Monad bind operation
type | B | Target bound value type |
param | Fail | Failure mapping function |
returns |
|
method TryT<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 TryT<M, B> Bind <B> (Func<A, Pure<B>> f) Source #
Monad bind operation
type | B | Target bound value type |
param | f | Mapping function |
returns |
|
method TryT<M, C> SelectMany <B, C> (Func<A, K<TryT<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 TryT<M, C> SelectMany <B, C> (Func<A, TryT<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 TryT<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 TryT<M, C> SelectMany <B, C> (Func<A, Fin<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 TryT<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 TryT<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 >> (TryT<M, A> lhs, TryT<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 >> (TryT<M, A> lhs, K<TryT<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 >> (TryT<M, A> lhs, TryT<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 TryTExtensions Source #
Either monad extensions
method K<M, Fin<A>> Run <M, A> (this K<TryT<M>, A> ma) Source #
Run the transformer
This is where the exceptions are caught
method TryT<M, A> Flatten <M, A> (this K<TryT<M>, TryT<M, A>> mma) Source #
Monadic join
method TryT<M, A> Flatten <M, A> (this K<TryT<M>, K<TryT<M>, A>> mma) Source #
Monadic join
method TryT<M, C> SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, K<TryT<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 TryT<M, C> SelectMany <M, A, B, C> ( this K<M, A> ma, Func<A, TryT<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 TryTExtensions Source #
method TryT<M, B> Map <M, A, B> (this Func<A, B> f, K<TryT<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 TryT<M, B> Map <M, A, B> (this Func<A, B> f, TryT<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 TryT<M, B> Action <M, A, B> (this TryT<M, A> ma, K<TryT<M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method TryT<M, B> Action <M, A, B> (this K<TryT<M>, A> ma, K<TryT<M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method TryT<M, B> Apply <M, A, B> (this TryT<M, Func<A, B>> mf, K<TryT<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 TryT<M, B> Apply <M, A, B> (this K<TryT<M>, Func<A, B>> mf, K<TryT<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 TryT<M, B> map <M, A, B> (Func<A, B> f, K<TryT<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 TryT<M, B> action <M, A, B> (K<TryT<M>, A> ma, K<TryT<M>, B> mb) Source #
Applicative action: runs the first applicative, ignores the result, and returns the second applicative
method TryT<M, B> apply <M, A, B> (K<TryT<M>, Func<A, B>> mf, K<TryT<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 |