move FallibleMonad to func::context

This commit is contained in:
AF 2023-07-06 03:32:14 +00:00
parent f0381672ff
commit 99088a1df8
2 changed files with 3 additions and 3 deletions

View File

@ -46,3 +46,6 @@ pub trait FallibleCtx<'a>: FunctorContext<'a> {
/// This is important for async applications stopping early. /// This is important for async applications stopping early.
type Fallible: MonadFailAny<'a, T = Self::T>; type Fallible: MonadFailAny<'a, T = Self::T>;
} }
/// Preferred monad for fallible uses.
pub type FallibleMonad<'a, Ctx, E> = <<Ctx as FallibleCtx<'a>>::Fallible as MonadFailAny<'a>>::W<E>;

View File

@ -6,9 +6,6 @@ use crate::func::context::*;
use super::*; use super::*;
/// Preferred monad for fallible uses.
pub type FallibleMonad<'a, Ctx, E> = <<Ctx as FallibleCtx<'a>>::Fallible as MonadFailAny<'a>>::W<E>;
/// Preferred [Wrapped] [Result]. /// Preferred [Wrapped] [Result].
pub type FallibleWrapped<'a, Ctx, A, E> = Wrap<'a, A, FallibleMonad<'a, Ctx, E>>; pub type FallibleWrapped<'a, Ctx, A, E> = Wrap<'a, A, FallibleMonad<'a, Ctx, E>>;