pandora-0.3.2: A box of patterns and paradigms

Pandora.Pattern.Functor.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 ($>>=) :: Covariant u => (a -> t b) -> ((u :. t) := a) -> (u :. t) := b Source #

Experimental methods

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

#### Instances

Instances details
 Source # Instance details 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 #($>>=) :: Covariant u => (a -> Identity b) -> ((u :. Identity) := a) -> (u :. Identity) := b Source #(<>>=) :: (Identity b -> c) -> (a -> Identity b) -> Identity a -> c Source # Source # Instance detailsDefined in Pandora.Paradigm.Primary.Functor.Maybe Methods(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b Source #(=<<) :: (a -> Maybe b) -> Maybe a -> Maybe b Source #bind :: (a -> Maybe b) -> Maybe a -> Maybe b Source #join :: ((Maybe :. Maybe) := a) -> Maybe a Source #(>=>) :: (a -> Maybe b) -> (b -> Maybe c) -> a -> Maybe c Source #(<=<) :: (b -> Maybe c) -> (a -> Maybe b) -> a -> Maybe c Source #($>>=) :: Covariant u => (a -> Maybe b) -> ((u :. Maybe) := a) -> (u :. Maybe) := b Source #(<>>=) :: (Maybe b -> c) -> (a -> Maybe b) -> Maybe a -> c Source # Bindable (Proxy :: Type -> Type) Source # Instance detailsDefined in Pandora.Paradigm.Primary.Functor.Proxy Methods(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b Source #(=<<) :: (a -> Proxy b) -> Proxy a -> Proxy b Source #bind :: (a -> Proxy b) -> Proxy a -> Proxy b Source #join :: ((Proxy :. Proxy) := a) -> Proxy a Source #(>=>) :: (a -> Proxy b) -> (b -> Proxy c) -> a -> Proxy c Source #(<=<) :: (b -> Proxy c) -> (a -> Proxy b) -> a -> Proxy c Source #($>>=) :: Covariant u => (a -> Proxy b) -> ((u :. Proxy) := a) -> (u :. Proxy) := b Source #(<>>=) :: (Proxy b -> c) -> (a -> Proxy b) -> Proxy a -> c Source # Covariant t => Bindable (Instruction t) Source # Instance details Methods(>>=) :: Instruction t a -> (a -> Instruction t b) -> Instruction t b Source #(=<<) :: (a -> Instruction t b) -> Instruction t a -> Instruction t b Source #bind :: (a -> Instruction t b) -> Instruction t a -> Instruction t b Source #join :: ((Instruction t :. Instruction t) := a) -> Instruction t a Source #(>=>) :: (a -> Instruction t b) -> (b -> Instruction t c) -> a -> Instruction t c Source #(<=<) :: (b -> Instruction t c) -> (a -> Instruction t b) -> a -> Instruction t c Source #($>>=) :: Covariant u => (a -> Instruction t b) -> ((u :. Instruction t) := a) -> (u :. Instruction t) := b Source #(<>>=) :: (Instruction t b -> c) -> (a -> Instruction t b) -> Instruction t a -> c Source # (Extractable t, Alternative t, Bindable t) => Bindable (Tap t) Source # Instance detailsDefined in Pandora.Paradigm.Primary.Transformer.Tap Methods(>>=) :: Tap t a -> (a -> Tap t b) -> Tap t b Source #(=<<) :: (a -> Tap t b) -> Tap t a -> Tap t b Source #bind :: (a -> Tap t b) -> Tap t a -> Tap t b Source #join :: ((Tap t :. Tap t) := a) -> Tap t a Source #(>=>) :: (a -> Tap t b) -> (b -> Tap t c) -> a -> Tap t c Source #(<=<) :: (b -> Tap t c) -> (a -> Tap t b) -> a -> Tap t c Source #($>>=) :: Covariant u => (a -> Tap t b) -> ((u :. Tap t) := a) -> (u :. Tap t) := b Source #(<>>=) :: (Tap t b -> c) -> (a -> Tap t b) -> Tap t a -> c Source # Source # Instance details Methods(>>=) :: Conclusion e a -> (a -> Conclusion e b) -> Conclusion e b Source #(=<<) :: (a -> Conclusion e b) -> Conclusion e a -> Conclusion e b Source #bind :: (a -> Conclusion e b) -> Conclusion e a -> Conclusion e b Source #join :: ((Conclusion e :. Conclusion e) := a) -> Conclusion e a Source #(>=>) :: (a -> Conclusion e b) -> (b -> Conclusion e c) -> a -> Conclusion e c Source #(<=<) :: (b -> Conclusion e c) -> (a -> Conclusion e b) -> a -> Conclusion e c Source #($>>=) :: Covariant u => (a -> Conclusion e b) -> ((u :. Conclusion e) := a) -> (u :. Conclusion e) := b Source #(<>>=) :: (Conclusion e b -> c) -> (a -> Conclusion e b) -> Conclusion e a -> c Source # Source # Instance detailsDefined in Pandora.Paradigm.Inventory.State Methods(>>=) :: State s a -> (a -> State s b) -> State s b Source #(=<<) :: (a -> State s b) -> State s a -> State s b Source #bind :: (a -> State s b) -> State s a -> State s b Source #join :: ((State s :. State s) := a) -> State s a Source #(>=>) :: (a -> State s b) -> (b -> State s c) -> a -> State s c Source #(<=<) :: (b -> State s c) -> (a -> State s b) -> a -> State s c Source #($>>=) :: Covariant u => (a -> State s b) -> ((u :. State s) := a) -> (u :. State s) := b Source #(<>>=) :: (State s b -> c) -> (a -> State s b) -> State s a -> c Source # Source # Instance detailsDefined in Pandora.Paradigm.Inventory.Environment Methods(>>=) :: Environment e a -> (a -> Environment e b) -> Environment e b Source #(=<<) :: (a -> Environment e b) -> Environment e a -> Environment e b Source #bind :: (a -> Environment e b) -> Environment e a -> Environment e b Source #join :: ((Environment e :. Environment e) := a) -> Environment e a Source #(>=>) :: (a -> Environment e b) -> (b -> Environment e c) -> a -> Environment e c Source #(<=<) :: (b -> Environment e c) -> (a -> Environment e b) -> a -> Environment e c Source #($>>=) :: Covariant u => (a -> Environment e b) -> ((u :. Environment e) := a) -> (u :. Environment e) := b Source #(<>>=) :: (Environment e b -> c) -> (a -> Environment e b) -> Environment e a -> c Source # Semigroup e => Bindable (Accumulator e) Source # Instance detailsDefined in Pandora.Paradigm.Inventory.Accumulator Methods(>>=) :: Accumulator e a -> (a -> Accumulator e b) -> Accumulator e b Source #(=<<) :: (a -> Accumulator e b) -> Accumulator e a -> Accumulator e b Source #bind :: (a -> Accumulator e b) -> Accumulator e a -> Accumulator e b Source #join :: ((Accumulator e :. Accumulator e) := a) -> Accumulator e a Source #(>=>) :: (a -> Accumulator e b) -> (b -> Accumulator e c) -> a -> Accumulator e c Source #(<=<) :: (b -> Accumulator e c) -> (a -> Accumulator e b) -> a -> Accumulator e c Source #($>>=) :: Covariant u => (a -> Accumulator e b) -> ((u :. Accumulator e) := a) -> (u :. Accumulator e) := b Source #(<>>=) :: (Accumulator e b -> c) -> (a -> Accumulator e b) -> Accumulator e a -> c Source # Source # Instance details Methods(>>=) :: Construction t a -> (a -> Construction t b) -> Construction t b Source #(=<<) :: (a -> Construction t b) -> Construction t a -> Construction t b Source #bind :: (a -> Construction t b) -> Construction t a -> Construction t b Source #join :: ((Construction t :. Construction t) := a) -> Construction t a Source #(>=>) :: (a -> Construction t b) -> (b -> Construction t c) -> a -> Construction t c Source #(<=<) :: (b -> Construction t c) -> (a -> Construction t b) -> a -> Construction t c Source #($>>=) :: Covariant u => (a -> Construction t b) -> ((u :. Construction t) := a) -> (u :. Construction t) := b Source #(<>>=) :: (Construction t b -> c) -> (a -> Construction t b) -> Construction t a -> c Source # (forall a. Semigroup ((t <:.> Construction t) := a), Bindable t) => Bindable (Comprehension t) Source # Instance details Methods(>>=) :: Comprehension t a -> (a -> Comprehension t b) -> Comprehension t b Source #(=<<) :: (a -> Comprehension t b) -> Comprehension t a -> Comprehension t b Source #bind :: (a -> Comprehension t b) -> Comprehension t a -> Comprehension t b Source #join :: ((Comprehension t :. Comprehension t) := a) -> Comprehension t a Source #(>=>) :: (a -> Comprehension t b) -> (b -> Comprehension t c) -> a -> Comprehension t c Source #(<=<) :: (b -> Comprehension t c) -> (a -> Comprehension t b) -> a -> Comprehension t c Source #($>>=) :: Covariant u => (a -> Comprehension t b) -> ((u :. Comprehension t) := a) -> (u :. Comprehension t) := b Source #(<>>=) :: (Comprehension t b -> c) -> (a -> Comprehension t b) -> Comprehension t a -> c Source # Bindable (Tagged tag) Source # Instance detailsDefined in Pandora.Paradigm.Primary.Functor.Tagged Methods(>>=) :: Tagged tag a -> (a -> Tagged tag b) -> Tagged tag b Source #(=<<) :: (a -> Tagged tag b) -> Tagged tag a -> Tagged tag b Source #bind :: (a -> Tagged tag b) -> Tagged tag a -> Tagged tag b Source #join :: ((Tagged tag :. Tagged tag) := a) -> Tagged tag a Source #(>=>) :: (a -> Tagged tag b) -> (b -> Tagged tag c) -> a -> Tagged tag c Source #(<=<) :: (b -> Tagged tag c) -> (a -> Tagged tag b) -> a -> Tagged tag c Source #($>>=) :: Covariant u => (a -> Tagged tag b) -> ((u :. Tagged tag) := a) -> (u :. Tagged tag) := b Source #(<>>=) :: (Tagged tag b -> c) -> (a -> Tagged tag b) -> Tagged tag a -> c Source # Bindable (Schematic Monad t u) => Bindable (t :> u) Source # Instance details Methods(>>=) :: (t :> u) a -> (a -> (t :> u) b) -> (t :> u) b Source #(=<<) :: (a -> (t :> u) b) -> (t :> u) a -> (t :> u) b Source #bind :: (a -> (t :> u) b) -> (t :> u) a -> (t :> u) b Source #join :: (((t :> u) :. (t :> u)) := a) -> (t :> u) a Source #(>=>) :: (a -> (t :> u) b) -> (b -> (t :> u) c) -> a -> (t :> u) c Source #(<=<) :: (b -> (t :> u) c) -> (a -> (t :> u) b) -> a -> (t :> u) c Source #($>>=) :: Covariant u0 => (a -> (t :> u) b) -> ((u0 :. (t :> u)) := a) -> (u0 :. (t :> u)) := b Source #(<>>=) :: ((t :> u) b -> c) -> (a -> (t :> u) b) -> (t :> u) a -> c Source # Bindable (Schematic Comonad t u) => Bindable (t :< u) Source # Instance details Methods(>>=) :: (t :< u) a -> (a -> (t :< u) b) -> (t :< u) b Source #(=<<) :: (a -> (t :< u) b) -> (t :< u) a -> (t :< u) b Source #bind :: (a -> (t :< u) b) -> (t :< u) a -> (t :< u) b Source #join :: (((t :< u) :. (t :< u)) := a) -> (t :< u) a Source #(>=>) :: (a -> (t :< u) b) -> (b -> (t :< u) c) -> a -> (t :< u) c Source #(<=<) :: (b -> (t :< u) c) -> (a -> (t :< u) b) -> a -> (t :< u) c Source #($>>=) :: Covariant u0 => (a -> (t :< u) b) -> ((u0 :. (t :< u)) := a) -> (u0 :. (t :< u)) := b Source #(<>>=) :: ((t :< u) b -> c) -> (a -> (t :< u) b) -> (t :< u) a -> c Source # Bindable ((->) e :: Type -> Type) Source # Instance detailsDefined in Pandora.Pattern.Functor.Bindable Methods(>>=) :: (e -> a) -> (a -> e -> b) -> e -> b Source #(=<<) :: (a -> e -> b) -> (e -> a) -> e -> b Source #bind :: (a -> e -> b) -> (e -> a) -> e -> b Source #join :: (((->) e :. (->) e) := a) -> e -> a Source #(>=>) :: (a -> e -> b) -> (b -> e -> c) -> a -> e -> c Source #(<=<) :: (b -> e -> c) -> (a -> e -> b) -> a -> e -> c Source #($>>=) :: Covariant u => (a -> e -> b) -> ((u :. (->) e) := a) -> (u :. (->) e) := b Source #(<>>=) :: ((e -> b) -> c) -> (a -> e -> b) -> (e -> a) -> c Source # Covariant t => Bindable (Continuation r t) Source # Instance details Methods(>>=) :: Continuation r t a -> (a -> Continuation r t b) -> Continuation r t b Source #(=<<) :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #bind :: (a -> Continuation r t b) -> Continuation r t a -> Continuation r t b Source #join :: ((Continuation r t :. Continuation r t) := a) -> Continuation r t a Source #(>=>) :: (a -> Continuation r t b) -> (b -> Continuation r t c) -> a -> Continuation r t c Source #(<=<) :: (b -> Continuation r t c) -> (a -> Continuation r t b) -> a -> Continuation r t c Source #($>>=) :: Covariant u => (a -> Continuation r t b) -> ((u :. Continuation r t) := a) -> (u :. Continuation r t) := b Source #(<>>=) :: (Continuation r t b -> c) -> (a -> Continuation r t b) -> Continuation r t a -> c Source # Bindable u => Bindable ((((->) s :: Type -> Type) <:<.>:> (:*:) s) := u) Source # Instance detailsDefined in Pandora.Paradigm.Inventory.State Methods(>>=) :: (((->) s <:<.>:> (:*:) s) := u) a -> (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> (((->) s <:<.>:> (:*:) s) := u) b Source #(=<<) :: (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> (((->) s <:<.>:> (:*:) s) := u) a -> (((->) s <:<.>:> (:*:) s) := u) b Source #bind :: (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> (((->) s <:<.>:> (:*:) s) := u) a -> (((->) s <:<.>:> (:*:) s) := u) b Source #join :: (((((->) s <:<.>:> (:*:) s) := u) :. (((->) s <:<.>:> (:*:) s) := u)) := a) -> (((->) s <:<.>:> (:*:) s) := u) a Source #(>=>) :: (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> (b -> (((->) s <:<.>:> (:*:) s) := u) c) -> a -> (((->) s <:<.>:> (:*:) s) := u) c Source #(<=<) :: (b -> (((->) s <:<.>:> (:*:) s) := u) c) -> (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> a -> (((->) s <:<.>:> (:*:) s) := u) c Source #($>>=) :: Covariant u0 => (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> ((u0 :. (((->) s <:<.>:> (:*:) s) := u)) := a) -> (u0 :. (((->) s <:<.>:> (:*:) s) := u)) := b Source #(<>>=) :: ((((->) s <:<.>:> (:*:) s) := u) b -> c) -> (a -> (((->) s <:<.>:> (:*:) s) := u) b) -> (((->) s <:<.>:> (:*:) s) := u) a -> c Source # (Semigroup e, Pointable u, Bindable u) => Bindable ((:*:) e <.:> u) Source # Instance detailsDefined in Pandora.Paradigm.Inventory.Accumulator Methods(>>=) :: ((:*:) e <.:> u) a -> (a -> ((:*:) e <.:> u) b) -> ((:*:) e <.:> u) b Source #(=<<) :: (a -> ((:*:) e <.:> u) b) -> ((:*:) e <.:> u) a -> ((:*:) e <.:> u) b Source #bind :: (a -> ((:*:) e <.:> u) b) -> ((:*:) e <.:> u) a -> ((:*:) e <.:> u) b Source #join :: ((((:*:) e <.:> u) :. ((:*:) e <.:> u)) := a) -> ((:*:) e <.:> u) a Source #(>=>) :: (a -> ((:*:) e <.:> u) b) -> (b -> ((:*:) e <.:> u) c) -> a -> ((:*:) e <.:> u) c Source #(<=<) :: (b -> ((:*:) e <.:> u) c) -> (a -> ((:*:) e <.:> u) b) -> a -> ((:*:) e <.:> u) c Source #($>>=) :: Covariant u0 => (a -> ((:*:) e <.:> u) b) -> ((u0 :. ((:*:) e <.:> u)) := a) -> (u0 :. ((:*:) e <.:> u)) := b Source #(<>>=) :: (((:*:) e <.:> u) b -> c) -> (a -> ((:*:) e <.:> u) b) -> ((:*:) e <.:> u) a -> c Source # (Pointable u, Bindable u) => Bindable (Maybe <.:> u) Source # Instance detailsDefined in Pandora.Paradigm.Primary.Functor.Maybe Methods(>>=) :: (Maybe <.:> u) a -> (a -> (Maybe <.:> u) b) -> (Maybe <.:> u) b Source #(=<<) :: (a -> (Maybe <.:> u) b) -> (Maybe <.:> u) a -> (Maybe <.:> u) b Source #bind :: (a -> (Maybe <.:> u) b) -> (Maybe <.:> u) a -> (Maybe <.:> u) b Source #join :: (((Maybe <.:> u) :. (Maybe <.:> u)) := a) -> (Maybe <.:> u) a Source #(>=>) :: (a -> (Maybe <.:> u) b) -> (b -> (Maybe <.:> u) c) -> a -> (Maybe <.:> u) c Source #(<=<) :: (b -> (Maybe <.:> u) c) -> (a -> (Maybe <.:> u) b) -> a -> (Maybe <.:> u) c Source #($>>=) :: Covariant u0 => (a -> (Maybe <.:> u) b) -> ((u0 :. (Maybe <.:> u)) := a) -> (u0 :. (Maybe <.:> u)) := b Source #(<>>=) :: ((Maybe <.:> u) b -> c) -> (a -> (Maybe <.:> u) b) -> (Maybe <.:> u) a -> c Source # (Pointable u, Bindable u) => Bindable (Conclusion e <.:> u) Source # Instance details Methods(>>=) :: (Conclusion e <.:> u) a -> (a -> (Conclusion e <.:> u) b) -> (Conclusion e <.:> u) b Source #(=<<) :: (a -> (Conclusion e <.:> u) b) -> (Conclusion e <.:> u) a -> (Conclusion e <.:> u) b Source #bind :: (a -> (Conclusion e <.:> u) b) -> (Conclusion e <.:> u) a -> (Conclusion e <.:> u) b Source #join :: (((Conclusion e <.:> u) :. (Conclusion e <.:> u)) := a) -> (Conclusion e <.:> u) a Source #(>=>) :: (a -> (Conclusion e <.:> u) b) -> (b -> (Conclusion e <.:> u) c) -> a -> (Conclusion e <.:> u) c Source #(<=<) :: (b -> (Conclusion e <.:> u) c) -> (a -> (Conclusion e <.:> u) b) -> a -> (Conclusion e <.:> u) c Source #($>>=) :: Covariant u0 => (a -> (Conclusion e <.:> u) b) -> ((u0 :. (Conclusion e <.:> u)) := a) -> (u0 :. (Conclusion e <.:> u)) := b Source #(<>>=) :: ((Conclusion e <.:> u) b -> c) -> (a -> (Conclusion e <.:> u) b) -> (Conclusion e <.:> u) a -> c Source # Bindable u => Bindable (((->) e :: Type -> Type) <:.> u) Source # Instance detailsDefined in Pandora.Paradigm.Inventory.Environment Methods(>>=) :: ((->) e <:.> u) a -> (a -> ((->) e <:.> u) b) -> ((->) e <:.> u) b Source #(=<<) :: (a -> ((->) e <:.> u) b) -> ((->) e <:.> u) a -> ((->) e <:.> u) b Source #bind :: (a -> ((->) e <:.> u) b) -> ((->) e <:.> u) a -> ((->) e <:.> u) b Source #join :: ((((->) e <:.> u) :. ((->) e <:.> u)) := a) -> ((->) e <:.> u) a Source #(>=>) :: (a -> ((->) e <:.> u) b) -> (b -> ((->) e <:.> u) c) -> a -> ((->) e <:.> u) c Source #(<=<) :: (b -> ((->) e <:.> u) c) -> (a -> ((->) e <:.> u) b) -> a -> ((->) e <:.> u) c Source #(\$>>=) :: Covariant u0 => (a -> ((->) e <:.> u) b) -> ((u0 :. ((->) e <:.> u)) := a) -> (u0 :. ((->) e <:.> u)) := b Source #(<>>=) :: (((->) e <:.> u) b -> c) -> (a -> ((->) e <:.> u) b) -> ((->) e <:.> u) a -> c Source #