semigroupoids-5.3.7: Semigroupoids: Category sans id
Copyright (C) 2011-2018 Edward Kmett
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability provisional
Portability portable
Safe Haskell Trustworthy
Language Haskell2010

Data.Functor.Bind.Class

Description

This module is used to resolve the cyclic we get from defining these classes here rather than in a package upstream. Otherwise we'd get orphaned heads for many instances on the types in transformers and bifunctors .

Synopsis

Applyable functors

class Functor f => Apply f where Source #

A strong lax semi-monoidal endofunctor. This is equivalent to an Applicative without pure .

Laws:

(.) <$> u <.> v <.> w = u <.> (v <.> w)
x <.> (f <$> y) = (. f) <$> x <.> y
f <$> (x <.> y) = (f .) <$> x <.> y

The laws imply that .> and <. really ignore their left and right results, respectively, and really return their right and left results, respectively. Specifically,

(mf <$> m) .> (nf <$> n) = nf <$> (m .> n)
(mf <$> m) <. (nf <$> n) = mf <$> (m <. n)

Minimal complete definition

(<.>) | liftF2

Methods

(<.>) :: f (a -> b) -> f a -> f b infixl 4 Source #

(.>) :: f a -> f b -> f b infixl 4 Source #

 a .> b = const id <$> a <.> b

(<.) :: f a -> f b -> f a infixl 4 Source #

 a <. b = const <$> a <.> b

liftF2 :: (a -> b -> c) -> f a -> f b -> f c Source #

Lift a binary function into a comonad with zipping

Instances

Instances details
Apply [] Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: [a -> b] -> [a] -> [b] Source #

(.>) :: [a] -> [b] -> [b] Source #

(<.) :: [a] -> [b] -> [a] Source #

liftF2 :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

Apply Maybe Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply IO Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Par1 Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Q Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Complex Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Min Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Max Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply First Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Last Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Option Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ZipList Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Identity Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply First Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Last Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Dual Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Sum Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Product Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Down Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply NonEmpty Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply IntMap Source #

An IntMap is not Applicative , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Apply Tree Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply Seq Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ( Either a) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ( V1 :: Type -> Type ) Source #

A V1 is not Applicative , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Apply ( U1 :: Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Semigroup m => Apply ( (,) m) Source #

A (,) m is not Applicative unless its m is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (m, a -> b) -> (m, a) -> (m, b) Source #

(.>) :: (m, a) -> (m, b) -> (m, b) Source #

(<.) :: (m, a) -> (m, b) -> (m, a) Source #

liftF2 :: (a -> b -> c) -> (m, a) -> (m, b) -> (m, c) Source #

Monad m => Apply ( WrappedMonad m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ( Proxy :: Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Ord k => Apply ( Map k) Source #

A 'Map k' is not Applicative , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Map k (a -> b) -> Map k a -> Map k b Source #

(.>) :: Map k a -> Map k b -> Map k b Source #

(<.) :: Map k a -> Map k b -> Map k a Source #

liftF2 :: (a -> b -> c) -> Map k a -> Map k b -> Map k c Source #

Apply f => Apply ( Lift f) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Functor m, Monad m) => Apply ( MaybeT m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply m => Apply ( ListT m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Hashable k, Eq k) => Apply ( HashMap k) Source #

A 'HashMap k' is not Applicative , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply ( MaybeApply f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Applicative f => Apply ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply ( Rec1 f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Arrow a => Apply ( WrappedArrow a b) Source #
Instance details

Defined in Data.Functor.Bind.Class

Semigroup m => Apply ( Const m :: Type -> Type ) Source #

A Const m is not Applicative unless its m is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply ( Alt f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Alt f (a -> b) -> Alt f a -> Alt f b Source #

(.>) :: Alt f a -> Alt f b -> Alt f b Source #

(<.) :: Alt f a -> Alt f b -> Alt f a Source #

liftF2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c Source #

Biapply p => Apply ( Join p) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply w => Apply ( TracedT m w) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Apply w, Semigroup s) => Apply ( StoreT s w) Source #

A StoreT s w is not Applicative unless its s is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StoreT s w (a -> b) -> StoreT s w a -> StoreT s w b Source #

(.>) :: StoreT s w a -> StoreT s w b -> StoreT s w b Source #

(<.) :: StoreT s w a -> StoreT s w b -> StoreT s w a Source #

liftF2 :: (a -> b -> c) -> StoreT s w a -> StoreT s w b -> StoreT s w c Source #

( Semigroup e, Apply w) => Apply ( EnvT e w) Source #

An EnvT e w is not Applicative unless its e is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: EnvT e w (a -> b) -> EnvT e w a -> EnvT e w b Source #

(.>) :: EnvT e w a -> EnvT e w b -> EnvT e w b Source #

(<.) :: EnvT e w a -> EnvT e w b -> EnvT e w a Source #

liftF2 :: (a -> b -> c) -> EnvT e w a -> EnvT e w b -> EnvT e w c Source #

Apply w => Apply ( IdentityT w) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ( Tagged a) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply ( Reverse f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Semigroup f => Apply ( Constant f :: Type -> Type ) Source #

A Constant f is not Applicative unless its f is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

( Apply m, Semigroup w) => Apply ( WriterT w m) Source #

A WriterT w m is not Applicative unless its w is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

( Apply m, Semigroup w) => Apply ( WriterT w m) Source #

A WriterT w m is not Applicative unless its w is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Bind m => Apply ( WriterT w m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Bind m => Apply ( StateT s m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b Source #

(.>) :: StateT s m a -> StateT s m b -> StateT s m b Source #

(<.) :: StateT s m a -> StateT s m b -> StateT s m a Source #

liftF2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c Source #

Bind m => Apply ( StateT s m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b Source #

(.>) :: StateT s m a -> StateT s m b -> StateT s m b Source #

(<.) :: StateT s m a -> StateT s m b -> StateT s m a Source #

liftF2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c Source #

Apply m => Apply ( ReaderT e m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Functor m, Monad m) => Apply ( ExceptT e m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Functor m, Monad m) => Apply ( ErrorT e m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ErrorT e m (a -> b) -> ErrorT e m a -> ErrorT e m b Source #

(.>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b Source #

(<.) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m a Source #

liftF2 :: (a -> b -> c) -> ErrorT e m a -> ErrorT e m b -> ErrorT e m c Source #

Apply f => Apply ( Backwards f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply ( Static f a) Source #
Instance details

Defined in Data.Semigroupoid.Static

Methods

(<.>) :: Static f a (a0 -> b) -> Static f a a0 -> Static f a b Source #

(.>) :: Static f a a0 -> Static f a b -> Static f a b Source #

(<.) :: Static f a a0 -> Static f a b -> Static f a a0 Source #

liftF2 :: (a0 -> b -> c) -> Static f a a0 -> Static f a b -> Static f a c Source #

Apply ((->) m :: Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (m -> (a -> b)) -> (m -> a) -> m -> b Source #

(.>) :: (m -> a) -> (m -> b) -> m -> b Source #

(<.) :: (m -> a) -> (m -> b) -> m -> a Source #

liftF2 :: (a -> b -> c) -> (m -> a) -> (m -> b) -> m -> c Source #

Semigroup c => Apply ( K1 i c :: Type -> Type ) Source #

A K1 i c is not Applicative unless its c is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b Source #

(.>) :: K1 i c a -> K1 i c b -> K1 i c b Source #

(<.) :: K1 i c a -> K1 i c b -> K1 i c a Source #

liftF2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 Source #

( Apply f, Apply g) => Apply (f :*: g) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b Source #

(.>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #

(<.) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a Source #

liftF2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c Source #

( Apply f, Apply g) => Apply ( Product f g) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ( Cokleisli w a) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply ( ContT r m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b Source #

(.>) :: ContT r m a -> ContT r m b -> ContT r m b Source #

(<.) :: ContT r m a -> ContT r m b -> ContT r m a Source #

liftF2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c Source #

Apply f => Apply ( M1 i t f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: M1 i t f (a -> b) -> M1 i t f a -> M1 i t f b Source #

(.>) :: M1 i t f a -> M1 i t f b -> M1 i t f b Source #

(<.) :: M1 i t f a -> M1 i t f b -> M1 i t f a Source #

liftF2 :: (a -> b -> c) -> M1 i t f a -> M1 i t f b -> M1 i t f c Source #

( Apply f, Apply g) => Apply (f :.: g) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

(.>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source #

(<.) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source #

liftF2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c Source #

( Apply f, Apply g) => Apply ( Compose f g) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Bind m, Semigroup w) => Apply ( RWST r w s m) Source #

An RWST r w s m is not Applicative unless its w is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

(.>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<.) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

liftF2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

( Bind m, Semigroup w) => Apply ( RWST r w s m) Source #

An RWST r w s m is not Applicative unless its w is a Monoid , but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

(.>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<.) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

liftF2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

Bind m => Apply ( RWST r w s m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

(.>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<.) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

liftF2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

Wrappers

newtype WrappedApplicative f a Source #

Wrap an Applicative to be used as a member of Apply

Constructors

WrapApplicative

Fields

Instances

Instances details
Functor f => Functor ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Applicative f => Applicative ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Alternative f => Alternative ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Applicative f => Apply ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Alternative f => Alt ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Alt

Alternative f => Plus ( WrappedApplicative f) Source #
Instance details

Defined in Data.Functor.Plus

newtype MaybeApply f a Source #

Transform an Apply into an Applicative by adding a unit.

Constructors

MaybeApply

Fields

Instances

Instances details
Functor f => Functor ( MaybeApply f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply f => Applicative ( MaybeApply f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Comonad f => Comonad ( MaybeApply f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Extend f => Extend ( MaybeApply f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply ( MaybeApply f) Source #
Instance details

Defined in Data.Functor.Bind.Class

(<.*>) :: Apply f => f (a -> b) -> MaybeApply f a -> f b infixl 4 Source #

Apply a non-empty container of functions to a possibly-empty-with-unit container of values.

(<*.>) :: Apply f => MaybeApply f (a -> b) -> f a -> f b infixl 4 Source #

Apply a possibly-empty-with-unit container of functions to a non-empty container of values.

traverse1Maybe :: ( Traversable t, Apply f) => (a -> f b) -> t a -> MaybeApply f (t b) Source #

Traverse a Traversable using Apply , getting the results back in a MaybeApply .

Bindable functors

class Apply m => Bind m where Source #

A Monad sans return .

Minimal definition: Either join or >>-

If defining both, then the following laws (the default definitions) must hold:

join = (>>- id)
m >>- f = join (fmap f m)

Laws:

induced definition of <.>: f <.> x = f >>- (<$> x)

Finally, there are two associativity conditions:

associativity of (>>-):    (m >>- f) >>- g == m >>- (\x -> f x >>- g)
associativity of join:     join . join = join . fmap join

These can both be seen as special cases of the constraint that

associativity of (->-): (f ->- g) ->- h = f ->- (g ->- h)

Minimal complete definition

(>>-) | join

Methods

(>>-) :: m a -> (a -> m b) -> m b infixl 1 Source #

join :: m (m a) -> m a Source #

Instances

Instances details
Bind [] Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: [a] -> (a -> [b]) -> [b] Source #

join :: [[a]] -> [a] Source #

Bind Maybe Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind IO Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Q Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Complex Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Min Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Max Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind First Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Last Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Option Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Identity Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind First Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Last Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Dual Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Sum Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Product Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Down Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind NonEmpty Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind IntMap Source #

An IntMap is not a Monad , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Bind Tree Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind Seq Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind ( Either a) Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind ( V1 :: Type -> Type ) Source #

A V1 is not a Monad , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Semigroup m => Bind ( (,) m) Source #

A (,) m is not a Monad unless its m is a Monoid , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: (m, a) -> (a -> (m, b)) -> (m, b) Source #

join :: (m, (m, a)) -> (m, a) Source #

Monad m => Bind ( WrappedMonad m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind ( Proxy :: Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Ord k => Bind ( Map k) Source #

A 'Map k' is not a Monad , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Map k a -> (a -> Map k b) -> Map k b Source #

join :: Map k ( Map k a) -> Map k a Source #

( Functor m, Monad m) => Bind ( MaybeT m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Apply m, Monad m) => Bind ( ListT m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Hashable k, Eq k) => Bind ( HashMap k) Source #

A 'HashMap k' is not a Monad , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Bind f => Bind ( Alt f) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Alt f a -> (a -> Alt f b) -> Alt f b Source #

join :: Alt f ( Alt f a) -> Alt f a Source #

Bind m => Bind ( IdentityT m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind ( Tagged a) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Bind m, Semigroup w) => Bind ( WriterT w m) Source #

A WriterT w m is not a Monad unless its w is a Monoid , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

( Bind m, Semigroup w) => Bind ( WriterT w m) Source #

A WriterT w m is not a Monad unless its w is a Monoid , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Bind m => Bind ( WriterT w m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Bind m => Bind ( StateT s m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b Source #

join :: StateT s m ( StateT s m a) -> StateT s m a Source #

Bind m => Bind ( StateT s m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b Source #

join :: StateT s m ( StateT s m a) -> StateT s m a Source #

Bind m => Bind ( ReaderT e m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Functor m, Monad m) => Bind ( ExceptT e m) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Functor m, Monad m) => Bind ( ErrorT e m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b Source #

join :: ErrorT e m ( ErrorT e m a) -> ErrorT e m a Source #

Bind ((->) m :: Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: (m -> a) -> (a -> m -> b) -> m -> b Source #

join :: (m -> (m -> a)) -> m -> a Source #

( Bind f, Bind g) => Bind ( Product f g) Source #
Instance details

Defined in Data.Functor.Bind.Class

Bind ( ContT r m) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b Source #

join :: ContT r m ( ContT r m a) -> ContT r m a Source #

( Bind m, Semigroup w) => Bind ( RWST r w s m) Source #

An RWST r w s m is not a Monad unless its w is a Monoid , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

join :: RWST r w s m ( RWST r w s m a) -> RWST r w s m a Source #

( Bind m, Semigroup w) => Bind ( RWST r w s m) Source #

An RWST r w s m is not a Monad unless its w is a Monoid , but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

join :: RWST r w s m ( RWST r w s m a) -> RWST r w s m a Source #

Bind m => Bind ( RWST r w s m) Source #

Since: 5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

join :: RWST r w s m ( RWST r w s m a) -> RWST r w s m a Source #

apDefault :: Bind f => f (a -> b) -> f a -> f b Source #

returning :: Functor f => f a -> (a -> b) -> f b Source #

Biappliable bifunctors

class Bifunctor p => Biapply p where Source #

Minimal complete definition

(<<.>>)

Methods

(<<.>>) :: p (a -> b) (c -> d) -> p a c -> p b d infixl 4 Source #

(.>>) :: p a b -> p c d -> p c d infixl 4 Source #

a .> b ≡ const id <$> a <.> b

(<<.) :: p a b -> p c d -> p a b infixl 4 Source #

a <. b ≡ const <$> a <.> b

Instances

Instances details
Biapply (,) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (a -> b, c -> d) -> (a, c) -> (b, d) Source #

(.>>) :: (a, b) -> (c, d) -> (c, d) Source #

(<<.) :: (a, b) -> (c, d) -> (a, b) Source #

Biapply Arg Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Arg (a -> b) (c -> d) -> Arg a c -> Arg b d Source #

(.>>) :: Arg a b -> Arg c d -> Arg c d Source #

(<<.) :: Arg a b -> Arg c d -> Arg a b Source #

Semigroup x => Biapply ( (,,) x) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (x, a -> b, c -> d) -> (x, a, c) -> (x, b, d) Source #

(.>>) :: (x, a, b) -> (x, c, d) -> (x, c, d) Source #

(<<.) :: (x, a, b) -> (x, c, d) -> (x, a, b) Source #

Biapply ( Const :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Biapply ( Tagged :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

( Semigroup x, Semigroup y) => Biapply ( (,,,) x y) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (x, y, a -> b, c -> d) -> (x, y, a, c) -> (x, y, b, d) Source #

(.>>) :: (x, y, a, b) -> (x, y, c, d) -> (x, y, c, d) Source #

(<<.) :: (x, y, a, b) -> (x, y, c, d) -> (x, y, a, b) Source #

( Semigroup x, Semigroup y, Semigroup z) => Biapply ( (,,,,) x y z) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (x, y, z, a -> b, c -> d) -> (x, y, z, a, c) -> (x, y, z, b, d) Source #

(.>>) :: (x, y, z, a, b) -> (x, y, z, c, d) -> (x, y, z, c, d) Source #

(<<.) :: (x, y, z, a, b) -> (x, y, z, c, d) -> (x, y, z, a, b) Source #

Biapply p => Biapply ( WrappedBifunctor p) Source #
Instance details

Defined in Data.Functor.Bind.Class

Apply g => Biapply ( Joker g :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Joker g (a -> b) (c -> d) -> Joker g a c -> Joker g b d Source #

(.>>) :: Joker g a b -> Joker g c d -> Joker g c d Source #

(<<.) :: Joker g a b -> Joker g c d -> Joker g a b Source #

Biapply p => Biapply ( Flip p) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Flip p (a -> b) (c -> d) -> Flip p a c -> Flip p b d Source #

(.>>) :: Flip p a b -> Flip p c d -> Flip p c d Source #

(<<.) :: Flip p a b -> Flip p c d -> Flip p a b Source #

Apply f => Biapply ( Clown f :: Type -> Type -> Type ) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Clown f (a -> b) (c -> d) -> Clown f a c -> Clown f b d Source #

(.>>) :: Clown f a b -> Clown f c d -> Clown f c d Source #

(<<.) :: Clown f a b -> Clown f c d -> Clown f a b Source #

( Biapply p, Biapply q) => Biapply ( Product p q) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Product p q (a -> b) (c -> d) -> Product p q a c -> Product p q b d Source #

(.>>) :: Product p q a b -> Product p q c d -> Product p q c d Source #

(<<.) :: Product p q a b -> Product p q c d -> Product p q a b Source #

( Apply f, Biapply p) => Biapply ( Tannen f p) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Tannen f p (a -> b) (c -> d) -> Tannen f p a c -> Tannen f p b d Source #

(.>>) :: Tannen f p a b -> Tannen f p c d -> Tannen f p c d Source #

(<<.) :: Tannen f p a b -> Tannen f p c d -> Tannen f p a b Source #

( Biapply p, Apply f, Apply g) => Biapply ( Biff p f g) Source #
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Biff p f g (a -> b) (c -> d) -> Biff p f g a c -> Biff p f g b d Source #

(.>>) :: Biff p f g a b -> Biff p f g c d -> Biff p f g c d Source #

(<<.) :: Biff p f g a b -> Biff p f g c d -> Biff p f g a b Source #