semigroupoids-5.2.2: Semigroupoids: Category sans id

Data.Functor.Bind

Description

Synopsis

# Functors

class Functor (f :: * -> *) where #

The Functor class is used for types that can be mapped over. Instances of Functor should satisfy the following laws:

fmap id  ==  id
fmap (f . g)  ==  fmap f . fmap g

The instances of Functor for lists, Maybe and IO satisfy these laws.

Minimal complete definition

fmap

Methods

fmap :: (a -> b) -> f a -> f b #

(<$) :: a -> f b -> f a infixl 4 # Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version. Instances  Functor [] Since: 2.1 Methodsfmap :: (a -> b) -> [a] -> [b] #(<$) :: a -> [b] -> [a] # Since: 2.1 Methodsfmap :: (a -> b) -> Maybe a -> Maybe b #(<$) :: a -> Maybe b -> Maybe a # Since: 2.1 Methodsfmap :: (a -> b) -> IO a -> IO b #(<$) :: a -> IO b -> IO a # Methodsfmap :: (a -> b) -> Par1 a -> Par1 b #(<$) :: a -> Par1 b -> Par1 a # Methodsfmap :: (a -> b) -> Q a -> Q b #(<$) :: a -> Q b -> Q a # Methodsfmap :: (a -> b) -> Complex a -> Complex b #(<$) :: a -> Complex b -> Complex a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Min a -> Min b #(<$) :: a -> Min b -> Min a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Max a -> Max b #(<$) :: a -> Max b -> Max a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> First a -> First b #(<$) :: a -> First b -> First a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Last a -> Last b #(<$) :: a -> Last b -> Last a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Option a -> Option b #(<$) :: a -> Option b -> Option a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> NonEmpty a -> NonEmpty b #(<$) :: a -> NonEmpty b -> NonEmpty a # Methodsfmap :: (a -> b) -> ZipList a -> ZipList b #(<$) :: a -> ZipList b -> ZipList a # Since: 4.8.0.0 Methodsfmap :: (a -> b) -> Identity a -> Identity b #(<$) :: a -> Identity b -> Identity a # Since: 4.6.0.0 Methodsfmap :: (a -> b) -> Handler a -> Handler b #(<$) :: a -> Handler b -> Handler a # Since: 4.3.0.0 Methodsfmap :: (a -> b) -> STM a -> STM b #(<$) :: a -> STM b -> STM a # Since: 4.8.0.0 Methodsfmap :: (a -> b) -> Dual a -> Dual b #(<$) :: a -> Dual b -> Dual a # Since: 4.8.0.0 Methodsfmap :: (a -> b) -> Sum a -> Sum b #(<$) :: a -> Sum b -> Sum a # Since: 4.8.0.0 Methodsfmap :: (a -> b) -> Product a -> Product b #(<$) :: a -> Product b -> Product a # Methodsfmap :: (a -> b) -> First a -> First b #(<$) :: a -> First b -> First a # Methodsfmap :: (a -> b) -> Last a -> Last b #(<$) :: a -> Last b -> Last a # Methodsfmap :: (a -> b) -> IntMap a -> IntMap b #(<$) :: a -> IntMap b -> IntMap a # Methodsfmap :: (a -> b) -> Tree a -> Tree b #(<$) :: a -> Tree b -> Tree a # Methodsfmap :: (a -> b) -> Seq a -> Seq b #(<$) :: a -> Seq b -> Seq a # Methodsfmap :: (a -> b) -> FingerTree a -> FingerTree b #(<$) :: a -> FingerTree b -> FingerTree a # Methodsfmap :: (a -> b) -> Digit a -> Digit b #(<$) :: a -> Digit b -> Digit a # Methodsfmap :: (a -> b) -> Node a -> Node b #(<$) :: a -> Node b -> Node a # Methodsfmap :: (a -> b) -> Elem a -> Elem b #(<$) :: a -> Elem b -> Elem a # Methodsfmap :: (a -> b) -> ViewL a -> ViewL b #(<$) :: a -> ViewL b -> ViewL a # Methodsfmap :: (a -> b) -> ViewR a -> ViewR b #(<$) :: a -> ViewR b -> ViewR a # Methodsfmap :: (a -> b) -> Doc a -> Doc b #(<$) :: a -> Doc b -> Doc a # Methodsfmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b #(<$) :: a -> AnnotDetails b -> AnnotDetails a # Methodsfmap :: (a -> b) -> Span a -> Span b #(<$) :: a -> Span b -> Span a # Since: 3.0 Methodsfmap :: (a -> b) -> Either a a -> Either a b #(<$) :: a -> Either a b -> Either a a # Methodsfmap :: (a -> b) -> V1 * a -> V1 * b #(<$) :: a -> V1 * b -> V1 * a # Since: 4.9.0.0 Methodsfmap :: (a -> b) -> U1 * a -> U1 * b #(<$) :: a -> U1 * b -> U1 * a # Functor ((,) a) Since: 2.1 Methodsfmap :: (a -> b) -> (a, a) -> (a, b) #(<$) :: a -> (a, b) -> (a, a) # Functor (Array i) Since: 2.1 Methodsfmap :: (a -> b) -> Array i a -> Array i b #(<$) :: a -> Array i b -> Array i a # Functor (Arg a) Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Arg a a -> Arg a b #(<$) :: a -> Arg a b -> Arg a a # Monad m => Functor (WrappedMonad m) Since: 2.1 Methodsfmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #(<$) :: a -> WrappedMonad m b -> WrappedMonad m a # Arrow a => Functor (ArrowMonad a) Since: 4.6.0.0 Methodsfmap :: (a -> b) -> ArrowMonad a a -> ArrowMonad a b #(<$) :: a -> ArrowMonad a b -> ArrowMonad a a # Since: 4.7.0.0 Methodsfmap :: (a -> b) -> Proxy * a -> Proxy * b #(<$) :: a -> Proxy * b -> Proxy * a # Functor (State s) Methodsfmap :: (a -> b) -> State s a -> State s b #(<$) :: a -> State s b -> State s a # Functor (Map k) Methodsfmap :: (a -> b) -> Map k a -> Map k b #(<$) :: a -> Map k b -> Map k a # Functor f => Functor (Lift f) Methodsfmap :: (a -> b) -> Lift f a -> Lift f b #(<$) :: a -> Lift f b -> Lift f a # Functor m => Functor (MaybeT m) Methodsfmap :: (a -> b) -> MaybeT m a -> MaybeT m b #(<$) :: a -> MaybeT m b -> MaybeT m a # Functor m => Functor (ListT m) Methodsfmap :: (a -> b) -> ListT m a -> ListT m b #(<$) :: a -> ListT m b -> ListT m a # Methodsfmap :: (a -> b) -> HashMap k a -> HashMap k b #(<$) :: a -> HashMap k b -> HashMap k a # Functor f => Functor (MaybeApply f) # Methodsfmap :: (a -> b) -> MaybeApply f a -> MaybeApply f b #(<$) :: a -> MaybeApply f b -> MaybeApply f a # # Methodsfmap :: (a -> b) -> WrappedApplicative f a -> WrappedApplicative f b #(<$) :: a -> WrappedApplicative f b -> WrappedApplicative f a # Functor f => Functor (Rec1 * f) Methodsfmap :: (a -> b) -> Rec1 * f a -> Rec1 * f b #(<$) :: a -> Rec1 * f b -> Rec1 * f a # Methodsfmap :: (a -> b) -> URec * Char a -> URec * Char b #(<$) :: a -> URec * Char b -> URec * Char a # Methodsfmap :: (a -> b) -> URec * Double a -> URec * Double b #(<$) :: a -> URec * Double b -> URec * Double a # Methodsfmap :: (a -> b) -> URec * Float a -> URec * Float b #(<$) :: a -> URec * Float b -> URec * Float a # Methodsfmap :: (a -> b) -> URec * Int a -> URec * Int b #(<$) :: a -> URec * Int b -> URec * Int a # Methodsfmap :: (a -> b) -> URec * Word a -> URec * Word b #(<$) :: a -> URec * Word b -> URec * Word a # Functor (URec * (Ptr ())) Methodsfmap :: (a -> b) -> URec * (Ptr ()) a -> URec * (Ptr ()) b #(<$) :: a -> URec * (Ptr ()) b -> URec * (Ptr ()) a # Arrow a => Functor (WrappedArrow a b) Since: 2.1 Methodsfmap :: (a -> b) -> WrappedArrow a b a -> WrappedArrow a b b #(<$) :: a -> WrappedArrow a b b -> WrappedArrow a b a # Since: 2.1 Methodsfmap :: (a -> b) -> Const * m a -> Const * m b #(<$) :: a -> Const * m b -> Const * m a # Functor f => Functor (Alt * f) Methodsfmap :: (a -> b) -> Alt * f a -> Alt * f b #(<$) :: a -> Alt * f b -> Alt * f a # Bifunctor p => Functor (Join * p) Methodsfmap :: (a -> b) -> Join * p a -> Join * p b #(<$) :: a -> Join * p b -> Join * p a # Functor w => Functor (TracedT m w) Methodsfmap :: (a -> b) -> TracedT m w a -> TracedT m w b #(<$) :: a -> TracedT m w b -> TracedT m w a # Functor w => Functor (StoreT s w) Methodsfmap :: (a -> b) -> StoreT s w a -> StoreT s w b #(<$) :: a -> StoreT s w b -> StoreT s w a # Functor w => Functor (EnvT e w) Methodsfmap :: (a -> b) -> EnvT e w a -> EnvT e w b #(<$) :: a -> EnvT e w b -> EnvT e w a # Functor (Cokleisli w a) Methodsfmap :: (a -> b) -> Cokleisli w a a -> Cokleisli w a b #(<$) :: a -> Cokleisli w a b -> Cokleisli w a a # Functor m => Functor (IdentityT * m) Methodsfmap :: (a -> b) -> IdentityT * m a -> IdentityT * m b #(<$) :: a -> IdentityT * m b -> IdentityT * m a # (Applicative f, Monad f) => Functor (WhenMissing f x) Methodsfmap :: (a -> b) -> WhenMissing f x a -> WhenMissing f x b #(<$) :: a -> WhenMissing f x b -> WhenMissing f x a # Functor (Tagged k s) Methodsfmap :: (a -> b) -> Tagged k s a -> Tagged k s b #(<$) :: a -> Tagged k s b -> Tagged k s a # Functor f => Functor (Reverse * f) Derived instance. Methodsfmap :: (a -> b) -> Reverse * f a -> Reverse * f b #(<$) :: a -> Reverse * f b -> Reverse * f a # Methodsfmap :: (a -> b) -> Constant * a a -> Constant * a b #(<$) :: a -> Constant * a b -> Constant * a a # Functor m => Functor (WriterT w m) Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor m => Functor (WriterT w m) Methodsfmap :: (a -> b) -> WriterT w m a -> WriterT w m b #(<$) :: a -> WriterT w m b -> WriterT w m a # Functor m => Functor (StateT s m) Methodsfmap :: (a -> b) -> StateT s m a -> StateT s m b #(<$) :: a -> StateT s m b -> StateT s m a # Functor m => Functor (StateT s m) Methodsfmap :: (a -> b) -> StateT s m a -> StateT s m b #(<$) :: a -> StateT s m b -> StateT s m a # Functor m => Functor (ExceptT e m) Methodsfmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b #(<$) :: a -> ExceptT e m b -> ExceptT e m a # Functor m => Functor (ErrorT e m) Methodsfmap :: (a -> b) -> ErrorT e m a -> ErrorT e m b #(<$) :: a -> ErrorT e m b -> ErrorT e m a # Functor f => Functor (Backwards * f) Derived instance. Methodsfmap :: (a -> b) -> Backwards * f a -> Backwards * f b #(<$) :: a -> Backwards * f b -> Backwards * f a # Functor f => Functor (Static f a) # Methodsfmap :: (a -> b) -> Static f a a -> Static f a b #(<$) :: a -> Static f a b -> Static f a a # Functor ((->) LiftedRep LiftedRep r) Since: 2.1 Methodsfmap :: (a -> b) -> (LiftedRep -> LiftedRep) r a -> (LiftedRep -> LiftedRep) r b #(<$) :: a -> (LiftedRep -> LiftedRep) r b -> (LiftedRep -> LiftedRep) r a # Functor (K1 * i c) Methodsfmap :: (a -> b) -> K1 * i c a -> K1 * i c b #(<$) :: a -> K1 * i c b -> K1 * i c a # (Functor g, Functor f) => Functor ((:+:) * f g) Methodsfmap :: (a -> b) -> (* :+: f) g a -> (* :+: f) g b #(<$) :: a -> (* :+: f) g b -> (* :+: f) g a # (Functor g, Functor f) => Functor ((:*:) * f g) Methodsfmap :: (a -> b) -> (* :*: f) g a -> (* :*: f) g b #(<$) :: a -> (* :*: f) g b -> (* :*: f) g a # (Functor f, Functor g) => Functor (Product * f g) Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Product * f g a -> Product * f g b #(<$) :: a -> Product * f g b -> Product * f g a # (Functor f, Functor g) => Functor (Sum * f g) Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Sum * f g a -> Sum * f g b #(<$) :: a -> Sum * f g b -> Sum * f g a # Functor f => Functor (WhenMatched f x y) Methodsfmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a # (Applicative f, Monad f) => Functor (WhenMissing f k x) Methodsfmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a # Functor m => Functor (ReaderT * r m) Methodsfmap :: (a -> b) -> ReaderT * r m a -> ReaderT * r m b #(<$) :: a -> ReaderT * r m b -> ReaderT * r m a # Functor (ContT k r m) Methodsfmap :: (a -> b) -> ContT k r m a -> ContT k r m b #(<$) :: a -> ContT k r m b -> ContT k r m a # Functor f => Functor (M1 * i c f) Methodsfmap :: (a -> b) -> M1 * i c f a -> M1 * i c f b #(<$) :: a -> M1 * i c f b -> M1 * i c f a # (Functor g, Functor f) => Functor ((:.:) * * f g) Methodsfmap :: (a -> b) -> (* :.: *) f g a -> (* :.: *) f g b #(<$) :: a -> (* :.: *) f g b -> (* :.: *) f g a # (Functor f, Functor g) => Functor (Compose * * f g) Since: 4.9.0.0 Methodsfmap :: (a -> b) -> Compose * * f g a -> Compose * * f g b #(<$) :: a -> Compose * * f g b -> Compose * * f g a # Bifunctor p => Functor (WrappedBifunctor * * p a) Methodsfmap :: (a -> b) -> WrappedBifunctor * * p a a -> WrappedBifunctor * * p a b #(<$) :: a -> WrappedBifunctor * * p a b -> WrappedBifunctor * * p a a # Functor g => Functor (Joker k * g a) Methodsfmap :: (a -> b) -> Joker k * g a a -> Joker k * g a b #(<$) :: a -> Joker k * g a b -> Joker k * g a a # Bifunctor p => Functor (Flip * * p a) Methodsfmap :: (a -> b) -> Flip * * p a a -> Flip * * p a b #(<$) :: a -> Flip * * p a b -> Flip * * p a a # Functor (Clown k * f a) Methodsfmap :: (a -> b) -> Clown k * f a a -> Clown k * f a b #(<$) :: a -> Clown k * f a b -> Clown k * f a a # Functor f => Functor (WhenMatched f k x y) Methodsfmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a # Functor m => Functor (RWST r w s m) Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<$) :: a -> RWST r w s m b -> RWST r w s m a # Functor m => Functor (RWST r w s m) Methodsfmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #(<$) :: a -> RWST r w s m b -> RWST r w s m a # (Functor f, Bifunctor p) => Functor (Tannen * * * f p a) Methodsfmap :: (a -> b) -> Tannen * * * f p a a -> Tannen * * * f p a b #(<$) :: a -> Tannen * * * f p a b -> Tannen * * * f p a a # (Bifunctor p, Functor g) => Functor (Biff * * k * p f g a) Methodsfmap :: (a -> b) -> Biff * * k * p f g a a -> Biff * * k * p f g a b #(<$) :: a -> Biff * * k * p f g a b -> Biff * * k * p f g a a # (<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

An infix synonym for fmap.

The name of this operator is an allusion to $. Note the similarities between their types:  ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b Whereas $ is function application, <$> is function application lifted over a Functor. #### Examples Convert from a Maybe Int to a Maybe String using show: >>> show <$> Nothing
Nothing
>>> show <$> Just 3 Just "3"  Convert from an Either Int Int to an Either Int String using show: >>> show <$> Left 17
Left 17
>>> show <$> Right 17 Right "17"  Double each element of a list: >>> (*2) <$> [1,2,3]
[2,4,6]


Apply even to the second element of a pair:

>>> even <$> (2,2) (2,True)  ($>) :: Functor f => f a -> b -> f b infixl 4 #

Flipped version of <$. #### Examples Replace the contents of a Maybe Int with a constant String: >>> Nothing$> "foo"
Nothing
>>> Just 90210 $> "foo" Just "foo"  Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String: >>> Left 8675309$> "foo"
Left 8675309
>>> Right 8675309 $> "foo" Right "foo"  Replace each element of a list with a constant String: >>> [1,2,3]$> "foo"
["foo","foo","foo"]


Replace the second element of a pair with a constant String:

>>> (1,2) $> "foo" (1,"foo")  Since: 4.7.0.0 # 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

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

 Apply [] Source # Methods(<.>) :: [a -> b] -> [a] -> [b] Source #(.>) :: [a] -> [b] -> [b] Source #(<.) :: [a] -> [b] -> [a] Source #liftF2 :: (a -> b -> c) -> [a] -> [b] -> [c] Source # Source # Methods(<.>) :: Maybe (a -> b) -> Maybe a -> Maybe b Source #(.>) :: Maybe a -> Maybe b -> Maybe b Source #(<.) :: Maybe a -> Maybe b -> Maybe a Source #liftF2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source # Source # Methods(<.>) :: IO (a -> b) -> IO a -> IO b Source #(.>) :: IO a -> IO b -> IO b Source #(<.) :: IO a -> IO b -> IO a Source #liftF2 :: (a -> b -> c) -> IO a -> IO b -> IO c Source # Source # Methods(<.>) :: Q (a -> b) -> Q a -> Q b Source #(.>) :: Q a -> Q b -> Q b Source #(<.) :: Q a -> Q b -> Q a Source #liftF2 :: (a -> b -> c) -> Q a -> Q b -> Q c Source # Source # Methods(<.>) :: Complex (a -> b) -> Complex a -> Complex b Source #(.>) :: Complex a -> Complex b -> Complex b Source #(<.) :: Complex a -> Complex b -> Complex a Source #liftF2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c Source # Source # Methods(<.>) :: Option (a -> b) -> Option a -> Option b Source #(.>) :: Option a -> Option b -> Option b Source #(<.) :: Option a -> Option b -> Option a Source #liftF2 :: (a -> b -> c) -> Option a -> Option b -> Option c Source # Source # Methods(<.>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source #(.>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #(<.) :: NonEmpty a -> NonEmpty b -> NonEmpty a Source #liftF2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source # Source # Methods(<.>) :: ZipList (a -> b) -> ZipList a -> ZipList b Source #(.>) :: ZipList a -> ZipList b -> ZipList b Source #(<.) :: ZipList a -> ZipList b -> ZipList a Source #liftF2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c Source # Source # Methods(<.>) :: Identity (a -> b) -> Identity a -> Identity b Source #(.>) :: Identity a -> Identity b -> Identity b Source #(<.) :: Identity a -> Identity b -> Identity a Source #liftF2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c Source # Source # An IntMap is not Applicative, but it is an instance of Apply Methods(<.>) :: IntMap (a -> b) -> IntMap a -> IntMap b Source #(.>) :: IntMap a -> IntMap b -> IntMap b Source #(<.) :: IntMap a -> IntMap b -> IntMap a Source #liftF2 :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c Source # Source # Methods(<.>) :: Tree (a -> b) -> Tree a -> Tree b Source #(.>) :: Tree a -> Tree b -> Tree b Source #(<.) :: Tree a -> Tree b -> Tree a Source #liftF2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c Source # Source # Methods(<.>) :: Seq (a -> b) -> Seq a -> Seq b Source #(.>) :: Seq a -> Seq b -> Seq b Source #(<.) :: Seq a -> Seq b -> Seq a Source #liftF2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c Source # Apply (Either a) Source # Methods(<.>) :: Either a (a -> b) -> Either a a -> Either a b Source #(.>) :: Either a a -> Either a b -> Either a b Source #(<.) :: Either a a -> Either a b -> Either a a Source #liftF2 :: (a -> b -> c) -> Either a a -> Either a b -> Either a c Source # Semigroup m => Apply ((,) m) Source # 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 # Methods(<.>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source #(.>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source #(<.) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source #liftF2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c Source # Source # Methods(<.>) :: Proxy * (a -> b) -> Proxy * a -> Proxy * b Source #(.>) :: Proxy * a -> Proxy * b -> Proxy * b Source #(<.) :: Proxy * a -> Proxy * b -> Proxy * a Source #liftF2 :: (a -> b -> c) -> Proxy * a -> Proxy * b -> Proxy * c Source # Ord k => Apply (Map k) Source # A Map is not Applicative, but it is an instance of Apply 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 # Methods(<.>) :: Lift f (a -> b) -> Lift f a -> Lift f b Source #(.>) :: Lift f a -> Lift f b -> Lift f b Source #(<.) :: Lift f a -> Lift f b -> Lift f a Source #liftF2 :: (a -> b -> c) -> Lift f a -> Lift f b -> Lift f c Source # (Functor m, Monad m) => Apply (MaybeT m) Source # Methods(<.>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b Source #(.>) :: MaybeT m a -> MaybeT m b -> MaybeT m b Source #(<.) :: MaybeT m a -> MaybeT m b -> MaybeT m a Source #liftF2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c Source # Apply m => Apply (ListT m) Source # Methods(<.>) :: ListT m (a -> b) -> ListT m a -> ListT m b Source #(.>) :: ListT m a -> ListT m b -> ListT m b Source #(<.) :: ListT m a -> ListT m b -> ListT m a Source #liftF2 :: (a -> b -> c) -> ListT m a -> ListT m b -> ListT m c Source # (Hashable k, Eq k) => Apply (HashMap k) Source # A HashMap is not Applicative, but it is an instance of Apply Methods(<.>) :: HashMap k (a -> b) -> HashMap k a -> HashMap k b Source #(.>) :: HashMap k a -> HashMap k b -> HashMap k b Source #(<.) :: HashMap k a -> HashMap k b -> HashMap k a Source #liftF2 :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c Source # Apply f => Apply (MaybeApply f) Source # Methods(<.>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b Source #(.>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b Source #(<.) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a Source #liftF2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c Source # Source # Methods(<.>) :: WrappedApplicative f (a -> b) -> WrappedApplicative f a -> WrappedApplicative f b Source #(.>) :: WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f b Source #(<.) :: WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f a Source #liftF2 :: (a -> b -> c) -> WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f c Source # Arrow a => Apply (WrappedArrow a b) Source # Methods(<.>) :: WrappedArrow a b (a -> b) -> WrappedArrow a b a -> WrappedArrow a b b Source #(.>) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b b Source #(<.) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b a Source #liftF2 :: (a -> b -> c) -> WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b c Source # Semigroup m => Apply (Const * m) Source # Methods(<.>) :: Const * m (a -> b) -> Const * m a -> Const * m b Source #(.>) :: Const * m a -> Const * m b -> Const * m b Source #(<.) :: Const * m a -> Const * m b -> Const * m a Source #liftF2 :: (a -> b -> c) -> Const * m a -> Const * m b -> Const * m c Source # Biapply p => Apply (Join * p) Source # Methods(<.>) :: Join * p (a -> b) -> Join * p a -> Join * p b Source #(.>) :: Join * p a -> Join * p b -> Join * p b Source #(<.) :: Join * p a -> Join * p b -> Join * p a Source #liftF2 :: (a -> b -> c) -> Join * p a -> Join * p b -> Join * p c Source # Apply w => Apply (TracedT m w) Source # Methods(<.>) :: TracedT m w (a -> b) -> TracedT m w a -> TracedT m w b Source #(.>) :: TracedT m w a -> TracedT m w b -> TracedT m w b Source #(<.) :: TracedT m w a -> TracedT m w b -> TracedT m w a Source #liftF2 :: (a -> b -> c) -> TracedT m w a -> TracedT m w b -> TracedT m w c Source # (Apply w, Semigroup s) => Apply (StoreT s w) Source # 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 # 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 (Cokleisli w a) Source # Methods(<.>) :: Cokleisli w a (a -> b) -> Cokleisli w a a -> Cokleisli w a b Source #(.>) :: Cokleisli w a a -> Cokleisli w a b -> Cokleisli w a b Source #(<.) :: Cokleisli w a a -> Cokleisli w a b -> Cokleisli w a a Source #liftF2 :: (a -> b -> c) -> Cokleisli w a a -> Cokleisli w a b -> Cokleisli w a c Source # Apply w => Apply (IdentityT * w) Source # Methods(<.>) :: IdentityT * w (a -> b) -> IdentityT * w a -> IdentityT * w b Source #(.>) :: IdentityT * w a -> IdentityT * w b -> IdentityT * w b Source #(<.) :: IdentityT * w a -> IdentityT * w b -> IdentityT * w a Source #liftF2 :: (a -> b -> c) -> IdentityT * w a -> IdentityT * w b -> IdentityT * w c Source # Apply (Tagged * a) Source # Methods(<.>) :: Tagged * a (a -> b) -> Tagged * a a -> Tagged * a b Source #(.>) :: Tagged * a a -> Tagged * a b -> Tagged * a b Source #(<.) :: Tagged * a a -> Tagged * a b -> Tagged * a a Source #liftF2 :: (a -> b -> c) -> Tagged * a a -> Tagged * a b -> Tagged * a c Source # Apply f => Apply (Reverse * f) Source # Methods(<.>) :: Reverse * f (a -> b) -> Reverse * f a -> Reverse * f b Source #(.>) :: Reverse * f a -> Reverse * f b -> Reverse * f b Source #(<.) :: Reverse * f a -> Reverse * f b -> Reverse * f a Source #liftF2 :: (a -> b -> c) -> Reverse * f a -> Reverse * f b -> Reverse * f c Source # Semigroup f => Apply (Constant * f) Source # Methods(<.>) :: Constant * f (a -> b) -> Constant * f a -> Constant * f b Source #(.>) :: Constant * f a -> Constant * f b -> Constant * f b Source #(<.) :: Constant * f a -> Constant * f b -> Constant * f a Source #liftF2 :: (a -> b -> c) -> Constant * f a -> Constant * f b -> Constant * f c Source # (Apply m, Semigroup w) => Apply (WriterT w m) Source # Methods(<.>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b Source #(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b Source #(<.) :: WriterT w m a -> WriterT w m b -> WriterT w m a Source #liftF2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c Source # (Apply m, Semigroup w) => Apply (WriterT w m) Source # Methods(<.>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b Source #(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b Source #(<.) :: WriterT w m a -> WriterT w m b -> WriterT w m a Source #liftF2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c Source # Bind m => Apply (StateT s m) Source # 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 # 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 # (Functor m, Monad m) => Apply (ExceptT e m) Source # Methods(<.>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b Source #(.>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source #(<.) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a Source #liftF2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source # (Functor m, Monad m) => Apply (ErrorT e m) Source # 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 # Methods(<.>) :: Backwards * f (a -> b) -> Backwards * f a -> Backwards * f b Source #(.>) :: Backwards * f a -> Backwards * f b -> Backwards * f b Source #(<.) :: Backwards * f a -> Backwards * f b -> Backwards * f a Source #liftF2 :: (a -> b -> c) -> Backwards * f a -> Backwards * f b -> Backwards * f c Source # Apply f => Apply (Static f a) Source # Methods(<.>) :: Static f a (a -> b) -> Static f a a -> Static f a b Source #(.>) :: Static f a a -> Static f a b -> Static f a b Source #(<.) :: Static f a a -> Static f a b -> Static f a a Source #liftF2 :: (a -> b -> c) -> Static f a a -> Static f a b -> Static f a c Source # Apply ((->) LiftedRep LiftedRep m) Source # Methods(<.>) :: (LiftedRep -> LiftedRep) m (a -> b) -> (LiftedRep -> LiftedRep) m a -> (LiftedRep -> LiftedRep) m b Source #(.>) :: (LiftedRep -> LiftedRep) m a -> (LiftedRep -> LiftedRep) m b -> (LiftedRep -> LiftedRep) m b Source #(<.) :: (LiftedRep -> LiftedRep) m a -> (LiftedRep -> LiftedRep) m b -> (LiftedRep -> LiftedRep) m a Source #liftF2 :: (a -> b -> c) -> (LiftedRep -> LiftedRep) m a -> (LiftedRep -> LiftedRep) m b -> (LiftedRep -> LiftedRep) m c Source # (Apply f, Apply g) => Apply (Product * f g) Source # Methods(<.>) :: Product * f g (a -> b) -> Product * f g a -> Product * f g b Source #(.>) :: Product * f g a -> Product * f g b -> Product * f g b Source #(<.) :: Product * f g a -> Product * f g b -> Product * f g a Source #liftF2 :: (a -> b -> c) -> Product * f g a -> Product * f g b -> Product * f g c Source # Apply m => Apply (ReaderT * e m) Source # Methods(<.>) :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b Source #(.>) :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m b Source #(<.) :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m a Source #liftF2 :: (a -> b -> c) -> ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m c Source # Apply (ContT * r m) Source # 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 g) => Apply (Compose * * f g) Source # Methods(<.>) :: Compose * * f g (a -> b) -> Compose * * f g a -> Compose * * f g b Source #(.>) :: Compose * * f g a -> Compose * * f g b -> Compose * * f g b Source #(<.) :: Compose * * f g a -> Compose * * f g b -> Compose * * f g a Source #liftF2 :: (a -> b -> c) -> Compose * * f g a -> Compose * * f g b -> Compose * * f g c Source # (Bind m, Semigroup w) => Apply (RWST r w s m) Source # 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 # 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 #

(<..>) :: Apply w => w a -> w (a -> b) -> w b infixl 4 Source #

A variant of <.> with the arguments reversed.

liftF3 :: Apply w => (a -> b -> c -> d) -> w a -> w b -> w c -> w d Source #

Lift a ternary function into a comonad with zipping

# Wrappers

newtype WrappedApplicative f a Source #

Wrap an Applicative to be used as a member of Apply

Constructors

 WrapApplicative FieldsunwrapApplicative :: f a

Instances

 Source # Methodsfmap :: (a -> b) -> WrappedApplicative f a -> WrappedApplicative f b #(<$) :: a -> WrappedApplicative f b -> WrappedApplicative f a # Source # Methodspure :: a -> WrappedApplicative f a #(<*>) :: WrappedApplicative f (a -> b) -> WrappedApplicative f a -> WrappedApplicative f b #liftA2 :: (a -> b -> c) -> WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f c #(*>) :: WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f b #(<*) :: WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f a # Source # Methods(<|>) :: WrappedApplicative f a -> WrappedApplicative f a -> WrappedApplicative f a #some :: WrappedApplicative f a -> WrappedApplicative f [a] #many :: WrappedApplicative f a -> WrappedApplicative f [a] # Source # Methods(<.>) :: WrappedApplicative f (a -> b) -> WrappedApplicative f a -> WrappedApplicative f b Source #(.>) :: WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f b Source #(<.) :: WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f a Source #liftF2 :: (a -> b -> c) -> WrappedApplicative f a -> WrappedApplicative f b -> WrappedApplicative f c Source # Source # Methods() :: WrappedApplicative f a -> WrappedApplicative f a -> WrappedApplicative f a Source #some :: Applicative (WrappedApplicative f) => WrappedApplicative f a -> WrappedApplicative f [a] Source #many :: Applicative (WrappedApplicative f) => WrappedApplicative f a -> WrappedApplicative f [a] Source # Source # Methods newtype MaybeApply f a Source # Transform a Apply into an Applicative by adding a unit. Constructors  MaybeApply FieldsrunMaybeApply :: Either (f a) a Instances  Functor f => Functor (MaybeApply f) Source # Methodsfmap :: (a -> b) -> MaybeApply f a -> MaybeApply f b #(<$) :: a -> MaybeApply f b -> MaybeApply f a # Apply f => Applicative (MaybeApply f) Source # Methodspure :: a -> MaybeApply f a #(<*>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b #liftA2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c #(*>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b #(<*) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a # Comonad f => Comonad (MaybeApply f) Source # Methodsextract :: MaybeApply f a -> a #duplicate :: MaybeApply f a -> MaybeApply f (MaybeApply f a) #extend :: (MaybeApply f a -> b) -> MaybeApply f a -> MaybeApply f b # Extend f => Extend (MaybeApply f) Source # Methodsduplicated :: MaybeApply f a -> MaybeApply f (MaybeApply f a) Source #extended :: (MaybeApply f a -> b) -> MaybeApply f a -> MaybeApply f b Source # Apply f => Apply (MaybeApply f) Source # Methods(<.>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b Source #(.>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b Source #(<.) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a Source #liftF2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c Source #

# 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

Methods

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

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

Instances

 Bind [] Source # Methods(>>-) :: [a] -> (a -> [b]) -> [b] Source #join :: [[a]] -> [a] Source # Source # Methods(>>-) :: Maybe a -> (a -> Maybe b) -> Maybe b Source #join :: Maybe (Maybe a) -> Maybe a Source # Source # Methods(>>-) :: IO a -> (a -> IO b) -> IO b Source #join :: IO (IO a) -> IO a Source # Source # Methods(>>-) :: Q a -> (a -> Q b) -> Q b Source #join :: Q (Q a) -> Q a Source # Source # Methods(>>-) :: Complex a -> (a -> Complex b) -> Complex b Source #join :: Complex (Complex a) -> Complex a Source # Source # Methods(>>-) :: Option a -> (a -> Option b) -> Option b Source #join :: Option (Option a) -> Option a Source # Source # Methods(>>-) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b Source #join :: NonEmpty (NonEmpty a) -> NonEmpty a Source # Source # Methods(>>-) :: Identity a -> (a -> Identity b) -> Identity b Source #join :: Identity (Identity a) -> Identity a Source # Source # An IntMap is not a Monad, but it is an instance of Bind Methods(>>-) :: IntMap a -> (a -> IntMap b) -> IntMap b Source #join :: IntMap (IntMap a) -> IntMap a Source # Source # Methods(>>-) :: Tree a -> (a -> Tree b) -> Tree b Source #join :: Tree (Tree a) -> Tree a Source # Source # Methods(>>-) :: Seq a -> (a -> Seq b) -> Seq b Source #join :: Seq (Seq a) -> Seq a Source # Bind (Either a) Source # Methods(>>-) :: Either a a -> (a -> Either a b) -> Either a b Source #join :: Either a (Either a a) -> Either a a Source # Semigroup m => Bind ((,) m) Source # Methods(>>-) :: (m, a) -> (a -> (m, b)) -> (m, b) Source #join :: (m, (m, a)) -> (m, a) Source # Monad m => Bind (WrappedMonad m) Source # Methods(>>-) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b Source #join :: WrappedMonad m (WrappedMonad m a) -> WrappedMonad m a Source # Source # Methods(>>-) :: Proxy * a -> (a -> Proxy * b) -> Proxy * b Source #join :: Proxy * (Proxy * a) -> Proxy * a Source # Ord k => Bind (Map k) Source # A Map is not a Monad, but it is an instance of Bind 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 # Methods(>>-) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b Source #join :: MaybeT m (MaybeT m a) -> MaybeT m a Source # (Apply m, Monad m) => Bind (ListT m) Source # Methods(>>-) :: ListT m a -> (a -> ListT m b) -> ListT m b Source #join :: ListT m (ListT m a) -> ListT m a Source # (Hashable k, Eq k) => Bind (HashMap k) Source # A HashMap is not a Monad, but it is an instance of Bind Methods(>>-) :: HashMap k a -> (a -> HashMap k b) -> HashMap k b Source #join :: HashMap k (HashMap k a) -> HashMap k a Source # Bind m => Bind (IdentityT * m) Source # Methods(>>-) :: IdentityT * m a -> (a -> IdentityT * m b) -> IdentityT * m b Source #join :: IdentityT * m (IdentityT * m a) -> IdentityT * m a Source # Bind (Tagged * a) Source # Methods(>>-) :: Tagged * a a -> (a -> Tagged * a b) -> Tagged * a b Source #join :: Tagged * a (Tagged * a a) -> Tagged * a a Source # (Bind m, Semigroup w) => Bind (WriterT w m) Source # Methods(>>-) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b Source #join :: WriterT w m (WriterT w m a) -> WriterT w m a Source # (Bind m, Semigroup w) => Bind (WriterT w m) Source # Methods(>>-) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b Source #join :: WriterT w m (WriterT w m a) -> WriterT w m a Source # Bind m => Bind (StateT s m) Source # 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 # 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 # (Functor m, Monad m) => Bind (ExceptT e m) Source # Methods(>>-) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b Source #join :: ExceptT e m (ExceptT e m a) -> ExceptT e m a Source # (Functor m, Monad m) => Bind (ErrorT e m) Source # 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 ((->) LiftedRep LiftedRep m) Source # Methods(>>-) :: (LiftedRep -> LiftedRep) m a -> (a -> (LiftedRep -> LiftedRep) m b) -> (LiftedRep -> LiftedRep) m b Source #join :: (LiftedRep -> LiftedRep) m ((LiftedRep -> LiftedRep) m a) -> (LiftedRep -> LiftedRep) m a Source # (Bind f, Bind g) => Bind (Product * f g) Source # Methods(>>-) :: Product * f g a -> (a -> Product * f g b) -> Product * f g b Source #join :: Product * f g (Product * f g a) -> Product * f g a Source # Bind m => Bind (ReaderT * e m) Source # Methods(>>-) :: ReaderT * e m a -> (a -> ReaderT * e m b) -> ReaderT * e m b Source #join :: ReaderT * e m (ReaderT * e m a) -> ReaderT * e m a Source # Bind (ContT * r m) Source # 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 # 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 # 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 => (a -> m b) -> m a -> m b infixr 1 Source #

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

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

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

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