Trait LinearMonad

Source
pub trait LinearMonad: LinearApplicative + Lift {
    // Required method
    fn lbind<TIn, TOut, F>(
        x: <Self as WithTypeArg<TIn>>::Type,
        f: F,
    ) -> <Self as WithTypeArg<TOut>>::Type
       where Self: WithTypeArg<TIn> + WithTypeArg<TOut>,
             F: FnOnce(TIn) -> <Self as WithTypeArg<TOut>>::Type;

    // Provided methods
    fn lbind_ignore<TIn, TOut>(
        x: <Self as WithTypeArg<TIn>>::Type,
        y: &<Self as WithTypeArg<TOut>>::Type,
    ) -> <Self as WithTypeArg<TOut>>::Type
       where Self: WithTypeArg<TIn> + WithTypeArg<TOut>,
             <Self as WithTypeArg<TOut>>::Type: Clone { ... }
    fn ljoin<T>(
        x: <Self as WithTypeArg<<Self as WithTypeArg<T>>::Type>>::Type,
    ) -> <Self as WithTypeArg<T>>::Type
       where Self: WithTypeArg<T> + WithTypeArg<<Self as WithTypeArg<T>>::Type> { ... }
}

Required Methods§

Source

fn lbind<TIn, TOut, F>( x: <Self as WithTypeArg<TIn>>::Type, f: F, ) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>, F: FnOnce(TIn) -> <Self as WithTypeArg<TOut>>::Type,

Provided Methods§

Source

fn lbind_ignore<TIn, TOut>( x: <Self as WithTypeArg<TIn>>::Type, y: &<Self as WithTypeArg<TOut>>::Type, ) -> <Self as WithTypeArg<TOut>>::Type
where Self: WithTypeArg<TIn> + WithTypeArg<TOut>, <Self as WithTypeArg<TOut>>::Type: Clone,

Source

fn ljoin<T>( x: <Self as WithTypeArg<<Self as WithTypeArg<T>>::Type>>::Type, ) -> <Self as WithTypeArg<T>>::Type
where Self: WithTypeArg<T> + WithTypeArg<<Self as WithTypeArg<T>>::Type>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl LinearMonad for haskell_bits::impls::OptionTypeCon

Source§

impl<E> LinearMonad for haskell_bits::impls::ResultTypeCon<E>