morphisms-functors-0.1.7: Functors, theirs compositions and transformations

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Covariant.Composition.Bindable

Synopsis

Documentation

class Covariant t => Bindable t where Source #

When providing a new instance, you should ensure it satisfies the one law:
* Interchange: t >>= f = join (f <$> t)

Minimal complete definition

(>>=)

Methods

(>>=) :: t a -> (a -> t b) -> t b infixl 1 Source #

Infix and flipped version of bind, the dual of =>>

(=<<) :: (a -> t b) -> t a -> t b infixr 1 Source #

Flipped version of >>=, the dual of <<=

bind :: (a -> t b) -> t a -> t b Source #

Prefix and flipped version of >>=, the dual of extend

join :: (t :.: t) a -> t a Source #

Merge effects/contexts, the dual of duplicate

(>=>) :: (a -> t b) -> (b -> t c) -> a -> t c infixr 1 Source #

Left-to-right Kleisli composition

(<=<) :: (b -> t c) -> (a -> t b) -> a -> t c infixr 1 Source #

Right-to-left Kleisli composition

Instances
Bindable Identity Source # 
Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b Source #

(=<<) :: (a -> Identity b) -> Identity a -> Identity b Source #

bind :: (a -> Identity b) -> Identity a -> Identity b Source #

join :: (Identity :.: Identity) a -> Identity a Source #

(>=>) :: (a -> Identity b) -> (b -> Identity c) -> a -> Identity c Source #

(<=<) :: (b -> Identity c) -> (a -> Identity b) -> a -> Identity c Source #

Bindable t => Bindable (Yoneda t) Source # 
Instance details

Defined in Data.Functor.Yoneda

Methods

(>>=) :: Yoneda t a -> (a -> Yoneda t b) -> Yoneda t b Source #

(=<<) :: (a -> Yoneda t b) -> Yoneda t a -> Yoneda t b Source #

bind :: (a -> Yoneda t b) -> Yoneda t a -> Yoneda t b Source #

join :: (Yoneda t :.: Yoneda t) a -> Yoneda t a Source #

(>=>) :: (a -> Yoneda t b) -> (b -> Yoneda t c) -> a -> Yoneda t c Source #

(<=<) :: (b -> Yoneda t c) -> (a -> Yoneda t b) -> a -> Yoneda t c Source #