- FallibleExtensions
- Catch <F, A> ( this K<F, A> fa, Func<Error, bool> Predicate, Func<Error, K<F, A>> Fail)
- Catch <M, A> ( this K<M, A> ma, Func<Error, bool> Predicate, Func<Error, K<IO, A>> Fail)
- Catch <F, A> ( this K<F, A> fa, Func<Error, bool> Predicate, Func<Error, Error> Fail)
- Catch <F, A> ( this K<F, A> fa, Func<Error, bool> Predicate, Func<Error, A> Fail)
- Catch <F, A> ( this K<F, A> fa, CatchM<Error, F, A> @catch)
- Catch <F, A> ( this K<F, A> fa, Error Match, Func<Error, K<F, A>> Fail)
- Catch <M, A> ( this K<M, A> ma, Error Match, Func<Error, K<IO, A>> Fail)
- Catch <F, A> ( this K<F, A> fa, Error Match, Func<Error, Error> Fail)
- Catch <F, A> ( this K<F, A> fa, Error Match, Func<Error, A> Fail)
- Catch <F, A> ( this K<F, A> fa, int Code, Func<Error, K<F, A>> Fail)
- Catch <M, A> ( this K<M, A> ma, int Code, Func<Error, K<IO, A>> Fail)
- Catch <F, A> ( this K<F, A> fa, int Code, Func<Error, Error> Fail)
- Catch <F, A> ( this K<F, A> fa, int Code, Func<Error, A> Fail)
- Catch <E, F, A> ( this K<F, A> fa, Func<E, K<F, A>> Fail)
- Catch <F, A> ( this K<F, A> fa, Func<Error, K<F, A>> Fail)
- Catch <M, A> ( this K<M, A> ma, Func<Error, K<IO, A>> Fail)
- Catch <F, A> ( this K<F, A> fa, Func<Error, Error> Fail)
- Catch <F, A> ( this K<F, A> fa, Func<Error, A> Fail)
- Catch <F, A> (this K<F, A> fa, Fail<Error> fail)
- Catch <F, A> (this K<F, A> fa, Error fail)
- Catch <F, A> (this K<F, A> fa, Pure<A> value)
- Catch <F, A> (this K<F, A> fa, A value)
- Catch <F, A> (this K<F, A> fa, K<F, A> alternative)
- FallibleExtensionsE
- Catch <E, F, A> ( this K<F, A> fa, Func<E, bool> Predicate, Func<E, K<F, A>> Fail)
- Catch <E, M, A> ( this K<M, A> ma, Func<E, bool> Predicate, Func<E, K<IO, A>> Fail)
- Catch <E, F, A> ( this K<F, A> fa, Func<E, bool> Predicate, Func<E, E> Fail)
- Catch <E, F, A> ( this K<F, A> fa, Func<E, bool> Predicate, Func<E, A> Fail)
- Catch <E, F, A> ( this K<F, A> fa, CatchM<E, F, A> @catch)
- Catch <E, M, A> ( this K<M, A> ma, E Match, Func<E, K<IO, A>> Fail)
- Catch <E, F, A> ( this K<F, A> fa, E Match, Func<E, E> Fail)
- Catch <E, F, A> ( this K<F, A> fa, E Match, Func<E, A> Fail)
- Catch <E, F, A> ( this K<F, A> fa, Func<E, K<F, A>> Fail)
- Catch <E, M, A> ( this K<M, A> ma, Func<E, K<IO, A>> Fail)
- Catch <E, F, A> ( this K<F, A> fa, Func<E, E> Fail)
- Catch <E, F, A> ( this K<F, A> fa, Func<E, A> Fail)
- Catch <E, F, A> (this K<F, A> fa, Fail<E> fail)
- Catch <E, F, A> (this K<F, A> fa, E fail)
- Catch <E, F, A> (this K<F, A> fa, Pure<A> value)
- Catch <E, F, A> (this K<F, A> fa, A value)
- Catch <E, F, A> (this K<F, A> fa, K<F, A> alternative)
- Fallible <FA, F, E, A>
- | (FA lhs, FA rhs)
- | (K<F, A> lhs, FA rhs)
- | (FA lhs, K<F, A> rhs)
- | (FA lhs, Pure<A> rhs)
- | (FA lhs, Fail<E> rhs)
- | (FA lhs, CatchM<E, F, A> rhs)
- Fallible
- Fallible <E, F>
- Fallible <F>
class FallibleExtensions Source #
Extensions for higher-kinded structures that have a failure state Error
type | F | Higher-kinded structure |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Func<Error, bool> Predicate, Func<Error, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<M, A> Catch <M, A> ( this K<M, A> ma, Func<Error, bool> Predicate, Func<Error, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Func<Error, bool> Predicate, Func<Error, Error> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Func<Error, bool> Predicate, Func<Error, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, CatchM<Error, F, A> @catch) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the catch structure and run its action if a match.
type | A | Bound value type |
param | fa |
|
param | @catch | Catch structure created by the |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Error Match, Func<Error, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<M, A> Catch <M, A> ( this K<M, A> ma, Error Match, Func<Error, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Error Match, Func<Error, Error> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Error Match, Func<Error, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, int Code, Func<Error, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Code | Error code to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<M, A> Catch <M, A> ( this K<M, A> ma, int Code, Func<Error, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Code | Error code to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, int Code, Func<Error, Error> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Code | Error code to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, int Code, Func<Error, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Code | Error code to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Func<Error, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<M, A> Catch <M, A> ( this K<M, A> ma, Func<Error, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Func<Error, Error> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> ( this K<F, A> fa, Func<Error, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <F, A> (this K<F, A> fa, Fail<Error> fail) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with fail
.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <F, A> (this K<F, A> fa, Error fail) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with fail
.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <F, A> (this K<F, A> fa, Pure<A> value) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with
the success value and cancelling the failure.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <F, A> (this K<F, A> fa, A value) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with
the success value and cancelling the failure.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <F, A> (this K<F, A> fa, K<F, A> alternative) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with
the alternative
computation, which may succeed or fail.
type | A | Bound value type |
param | fa |
|
class FallibleExtensionsE Source #
Extensions for higher-kinded structures that have a failure state E
type | F | Higher-kinded structure |
type | E | Failure type |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, bool> Predicate, Func<E, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<M, A> Catch <E, M, A> ( this K<M, A> ma, Func<E, bool> Predicate, Func<E, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, bool> Predicate, Func<E, E> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, bool> Predicate, Func<E, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, CatchM<E, F, A> @catch) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the catch structure and run its action if a match.
type | A | Bound value type |
param | fa |
|
param | @catch | Catch structure created by the |
returns | Either |
method K<M, A> Catch <E, M, A> ( this K<M, A> ma, E Match, Func<E, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, E Match, Func<E, E> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, E Match, Func<E, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Match | Error to match to |
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<M, A> Catch <E, M, A> ( this K<M, A> ma, Func<E, K<IO, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | ma |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, E> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> ( this K<F, A> fa, Func<E, A> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Fail | Handler when in failed state |
returns | Either |
method K<F, A> Catch <E, F, A> (this K<F, A> fa, Fail<E> fail) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with fail
.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <E, F, A> (this K<F, A> fa, E fail) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with fail
.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <E, F, A> (this K<F, A> fa, Pure<A> value) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with
the success value and cancelling the failure.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <E, F, A> (this K<F, A> fa, A value) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with
the success value and cancelling the failure.
type | A | Bound value type |
param | fa |
|
method K<F, A> Catch <E, F, A> (this K<F, A> fa, K<F, A> alternative) Source #
Run the Fallible
structure. If in a failed state, replace the failure value with
the alternative
computation, which may succeed or fail.
type | A | Bound value type |
param | fa |
|
interface Fallible <FA, F, E, A> Source #
Derive your concrete types from this interface to acquire to common set of
operators that will make working with the generic Fallible
trait more elegant.
It isn't a requirement to implement this interface for Fallible
to work, but
it guides the implementor. It is optional!
Primarily makes @catch
work nicely, but is generally benefical.
type | FA | 'Self' type, for example |
type | F | Trait implementation, for example |
type | E | Failure type, for example |
type | A | Bound value type, for example |
Module for higher-kinded structures that have a failure state E
type | F | Higher-kinded structure |
type | E | Failure type |
method K<F, A> fail <E, F, A> (E error) Source #
Raise a failure state in the Fallible
structure F
type | F | Fallible trait |
type | E | Error type |
type | A | Bound value type |
param | error | Error to raise |
returns |
method K<F, A> error <F, A> (Error error) Source #
Raise a failure state in the Fallible
structure F
type | F | Fallible trait |
type | A | Bound value type |
param | error | Error to raise |
returns |
interface Fallible <E, F> Source #
Trait for higher-kinded structures that have a failure state E
type | E | Failure type |
type | F | Higher-kinded structure |
method K<F, A> Fail <A> (E error) Source #
Raise a failure state in the Fallible
structure F
type | A | Bound value type |
param | error | Error value |
returns |
method K<F, A> Catch <A> ( K<F, A> fa, Func<E, bool> Predicate, Func<E, K<F, A>> Fail) Source #
Run the Fallible
structure. If in a failed state, test the failure value
against the predicate. If, it returns true
, run the Fail
function with
the failure value.
type | A | Bound value type |
param | fa |
|
param | Predicate | Predicate to test any failure values |
param | Fail | Handler when in failed state |
returns | Either |