Contents
- TryT <M, A> (K<M, Try<A>> runTry)
- 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, 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)
- Combine (TryT<M, A> rhs)
- TryT
Sub modules
| Extensions |
| Operators |
| Prelude |
| Trait |
record TryT <M, A> (K<M, Try<A>> runTry) Source #
TryT monad transformer, which allows for an optional Error result and catches exceptions,
converting them to Error.
Parameters
| type | M | Given monad trait |
| type | A | Bound value type |
Methods
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)
Parameters
| 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)
Parameters
| 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)
Parameters
| 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
Parameters
| 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
Parameters
| 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
Parameters
| param | f | Mapping function |
| returns |
| |
method TryT<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 |
| |
method TryT<M, B> Bind <B> (Func<A, K<TryT<M>, B>> f) Source #
Monad bind operation
Parameters
| 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
Parameters
| 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
Parameters
| 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
Parameters
| type | B | Target bound value type |
| param | Fail | Failure mapping function |
| returns |
| |
method TryT<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 |
| |
method TryT<M, C> SelectMany <B, C> (Func<A, K<TryT<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 |
| |
method TryT<M, C> SelectMany <B, C> (Func<A, TryT<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 |
| |
method TryT<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 |
| |
method TryT<M, C> SelectMany <B, C> (Func<A, Fin<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 |
| |
method TryT<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 |
| |
Methods
method TryT<M, A> Succ <M, A> (A value) Source #
Lift a pure success value into the monad-transformer
Parameters
| param | value | Value to lift |
| returns |
| |
method TryT<M, A> Fail <M, A> (Error value) Source #
Lift a fail value into the monad-transformer
Parameters
| param | value | Value to lift |
| returns |
| |
method TryT<M, A> lift <M, A> (K<M, A> ma) Source #
Lifts a given monad into the transformer
Parameters
| param | ma | Monad to lift |
| returns |
| |
method TryT<M, A> lift <M, A> (Func<Fin<A>> f) Source #
Lifts a given lazy-value into the transformer
Parameters
| param | f | Lazy value to lift |
| returns |
| |
method TryT<M, A> lift <M, A> (Fin<A> ma) Source #
Lifts a given value into the transformer
Parameters
| param | ma | Value to lift |
| returns |
| |
method TryT<M, A> lift <M, A> (Pure<A> ma) Source #
Lifts a given value into the transformer
Parameters
| param | ma | Value to lift |
| returns |
| |