remove Alternative
This commit is contained in:
parent
1750be2df9
commit
d78879f012
16
src/func.rs
16
src/func.rs
@ -235,22 +235,6 @@ pub trait MonadFail<E>: Monad + Fail<E> {}
|
||||
|
||||
impl<E, T: Monad + Fail<E>> MonadFail<E> for T {}
|
||||
|
||||
/// Equivalent of Haskell's `Alternative`.
|
||||
/// Lacks `some`/`many` definitions due to [`FnOnce`] category semantics.
|
||||
///
|
||||
/// <https://hackage.haskell.org/package/base-4.18.0.0/docs/Control-Applicative.html>
|
||||
pub trait Alternative: Applicative {
|
||||
/// Equivalent of Haskell's `empty`.
|
||||
fn empty<'a, A: 'a>() -> Self::F<'a, A>
|
||||
where
|
||||
Self: 'a;
|
||||
|
||||
/// Equivalent of Haskell's `<|>`.
|
||||
fn add<'a, A: 'a>(fa: Self::F<'a, A>, fb: Self::F<'a, A>) -> Self::F<'a, A>
|
||||
where
|
||||
Self: 'a;
|
||||
}
|
||||
|
||||
/// Represents wrapped results which are instantly available.
|
||||
pub trait LocalFunctor: WeakFunctor {
|
||||
/// Extract iteration state, if successful.
|
||||
|
Loading…
Reference in New Issue
Block a user