semigroupoids-5.3.7: Semigroupoids: Category sans id
Copyright (C) 2011-2015 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

Description

Synopsis

Functors

class Functor (f :: Type -> Type ) where Source #

A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b , preserving the structure of f . Furthermore f needs to adhere to the following:

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

Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds.

Minimal complete definition

fmap

Methods

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

Using ApplicativeDo : ' fmap f as ' can be understood as the do expression

do a <- as
   pure (f a)

with an inferred Functor constraint.

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

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.

Using ApplicativeDo : ' a <$ bs ' can be understood as the do expression

do bs
   pure a

with an inferred Functor constraint.

Instances

Instances details
Functor []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b Source #

(<$) :: a -> IO b -> IO a Source #

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor Q
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> Q a -> Q b Source #

(<$) :: a -> Q b -> Q a Source #

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Min a -> Min b Source #

(<$) :: a -> Min b -> Min a Source #

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Max a -> Max b Source #

(<$) :: a -> Max b -> Max a Source #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b Source #

(<$) :: a -> STM b -> STM a Source #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b Source #

(<$) :: a -> Sum b -> Sum a Source #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Functor IntMap
Instance details

Defined in Data.IntMap.Internal

Functor Tree
Instance details

Defined in Data.Tree

Functor Seq
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b Source #

(<$) :: a -> Seq b -> Seq a Source #

Functor FingerTree
Instance details

Defined in Data.Sequence.Internal

Functor Digit
Instance details

Defined in Data.Sequence.Internal

Functor Node
Instance details

Defined in Data.Sequence.Internal

Functor Elem
Instance details

Defined in Data.Sequence.Internal

Functor ViewL
Instance details

Defined in Data.Sequence.Internal

Functor ViewR
Instance details

Defined in Data.Sequence.Internal

Functor Doc
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Doc a -> Doc b Source #

(<$) :: a -> Doc b -> Doc a Source #

Functor AnnotDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Functor Span
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> P a -> P b Source #

(<$) :: a -> P b -> P a Source #

Functor ( Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Functor ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> V1 a -> V1 b Source #

(<$) :: a -> V1 b -> V1 a Source #

Functor ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> U1 a -> U1 b Source #

(<$) :: a -> U1 b -> U1 a Source #

Functor ( (,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b) -> (a, a0) -> (a, b) Source #

(<$) :: a0 -> (a, b) -> (a, a0) Source #

Functor ( Array i)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

fmap :: (a -> b) -> Array i a -> Array i b Source #

(<$) :: a -> Array i b -> Array i a Source #

Functor ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a0 -> b) -> Arg a a0 -> Arg a b Source #

(<$) :: a0 -> Arg a b -> Arg a a0 Source #

Monad m => Functor ( WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Arrow a => Functor ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Map k)
Instance details

Defined in Data.Map.Internal

Methods

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

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

Functor f => Functor ( Lift f)
Instance details

Defined in Control.Applicative.Lift

Methods

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

(<$) :: a -> Lift f b -> Lift f a Source #

Functor m => Functor ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

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

(<$) :: a -> MaybeT m b -> MaybeT m a Source #

Functor m => Functor ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Methods

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

(<$) :: a -> ListT m b -> ListT m a Source #

Functor ( HashMap k)
Instance details

Defined in Data.HashMap.Internal

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

Defined in Data.Functor.Bind.Class

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

Defined in Data.Functor.Bind.Class

Functor f => Functor ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

(<$) :: a -> Rec1 f b -> Rec1 f a Source #

Functor ( URec Char :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Double :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Float :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Int :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Word :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec ( Ptr ()) :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec ( Ptr ()) a -> URec ( Ptr ()) b Source #

(<$) :: a -> URec ( Ptr ()) b -> URec ( Ptr ()) a Source #

Functor ( (,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, a0) -> (a, b, b0) Source #

(<$) :: a0 -> (a, b, b0) -> (a, b, a0) Source #

Arrow a => Functor ( WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Functor m => Functor ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b Source #

(<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 Source #

Functor ( Const m :: Type -> Type )

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

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

(<$) :: a -> Const m b -> Const m a Source #

Functor f => Functor ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

(<$) :: a -> Ap f b -> Ap f a Source #

Functor f => Functor ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Bifunctor p => Functor ( Join p)
Instance details

Defined in Data.Bifunctor.Join

Methods

fmap :: (a -> b) -> Join p a -> Join p b Source #

(<$) :: a -> Join p b -> Join p a Source #

Functor w => Functor ( TracedT m w)
Instance details

Defined in Control.Comonad.Trans.Traced

Methods

fmap :: (a -> b) -> TracedT m w a -> TracedT m w b Source #

(<$) :: a -> TracedT m w b -> TracedT m w a Source #

Functor w => Functor ( StoreT s w)
Instance details

Defined in Control.Comonad.Trans.Store

Methods

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

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

Functor w => Functor ( EnvT e w)
Instance details

Defined in Control.Comonad.Trans.Env

Methods

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

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

Functor m => Functor ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Applicative f, Monad f) => Functor ( WhenMissing f x)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Functor ( Tagged s)
Instance details

Defined in Data.Tagged

Methods

fmap :: (a -> b) -> Tagged s a -> Tagged s b Source #

(<$) :: a -> Tagged s b -> Tagged s a Source #

Functor f => Functor ( Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Functor ( Constant a :: Type -> Type )
Instance details

Defined in Data.Functor.Constant

Functor m => Functor ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b Source #

(<$) :: a -> WriterT w m b -> WriterT w m a Source #

Functor m => Functor ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b Source #

(<$) :: a -> WriterT w m b -> WriterT w m a Source #

Functor m => Functor ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b Source #

(<$) :: a -> WriterT w m b -> WriterT w m a Source #

Functor m => Functor ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

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

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

Functor m => Functor ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

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

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

Functor m => Functor ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

(<$) :: a -> ReaderT r m b -> ReaderT r m a Source #

Functor m => Functor ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

(<$) :: a -> ExceptT e m b -> ExceptT e m a Source #

Functor m => Functor ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

Methods

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

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

Functor f => Functor ( Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Functor (Mag a b)
Instance details

Defined in Data.Biapplicative

Methods

fmap :: (a0 -> b0) -> Mag a b a0 -> Mag a b b0 Source #

(<$) :: a0 -> Mag a b b0 -> Mag a b a0 Source #

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

Defined in Data.Semigroupoid.Static

Methods

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

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

Functor ((->) r :: Type -> Type )

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> (r -> a) -> r -> b Source #

(<$) :: a -> (r -> b) -> r -> a Source #

Functor ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

( Functor f, Functor g) => Functor (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b Source #

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

( Functor f, Functor g) => Functor (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ( (,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source #

(<$) :: a0 -> (a, b, c, b0) -> (a, b, c, a0) Source #

( Functor f, Functor g) => Functor ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fmap :: (a -> b) -> Product f g a -> Product f g b Source #

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

( Functor f, Functor g) => Functor ( Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fmap :: (a -> b) -> Sum f g a -> Sum f g b Source #

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

Functor ( Cokleisli w a)
Instance details

Defined in Control.Comonad

Methods

fmap :: (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b Source #

(<$) :: a0 -> Cokleisli w a b -> Cokleisli w a a0 Source #

Functor f => Functor ( WhenMatched f x y)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b Source #

(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a Source #

( Applicative f, Monad f) => Functor ( WhenMissing f k x)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b Source #

(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a Source #

Functor ( ContT r m)
Instance details

Defined in Control.Monad.Trans.Cont

Methods

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

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

Functor f => Functor ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

(<$) :: a -> M1 i c f b -> M1 i c f a Source #

( Functor f, Functor g) => Functor (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

( Functor f, Functor g) => Functor ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fmap :: (a -> b) -> Compose f g a -> Compose f g b Source #

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

Bifunctor p => Functor ( WrappedBifunctor p a)
Instance details

Defined in Data.Bifunctor.Wrapped

Functor g => Functor ( Joker g a)
Instance details

Defined in Data.Bifunctor.Joker

Methods

fmap :: (a0 -> b) -> Joker g a a0 -> Joker g a b Source #

(<$) :: a0 -> Joker g a b -> Joker g a a0 Source #

Bifunctor p => Functor ( Flip p a)
Instance details

Defined in Data.Bifunctor.Flip

Methods

fmap :: (a0 -> b) -> Flip p a a0 -> Flip p a b Source #

(<$) :: a0 -> Flip p a b -> Flip p a a0 Source #

Functor ( Clown f a :: Type -> Type )
Instance details

Defined in Data.Bifunctor.Clown

Methods

fmap :: (a0 -> b) -> Clown f a a0 -> Clown f a b Source #

(<$) :: a0 -> Clown f a b -> Clown f a a0 Source #

Functor f => Functor ( WhenMatched f k x y)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b Source #

(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a Source #

Functor m => Functor ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

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

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

Functor m => Functor ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

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

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

Functor m => Functor ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

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

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

( Functor (f a), Functor (g a)) => Functor ( Product f g a)
Instance details

Defined in Data.Bifunctor.Product

Methods

fmap :: (a0 -> b) -> Product f g a a0 -> Product f g a b Source #

(<$) :: a0 -> Product f g a b -> Product f g a a0 Source #

( Functor f, Bifunctor p) => Functor ( Tannen f p a)
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fmap :: (a0 -> b) -> Tannen f p a a0 -> Tannen f p a b Source #

(<$) :: a0 -> Tannen f p a b -> Tannen f p a a0 Source #

( Bifunctor p, Functor g) => Functor ( Biff p f g a)
Instance details

Defined in Data.Bifunctor.Biff

Methods

fmap :: (a0 -> b) -> Biff p f g a a0 -> Biff p f g a b Source #

(<$) :: a0 -> Biff p f g a b -> Biff p f g a a0 Source #

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 Source #

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

Expand

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 Source #

Flipped version of <$ .

Using ApplicativeDo : ' as $> b ' can be understood as the do expression

do as
   pure b

with an inferred Functor constraint.

Examples

Expand

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: base-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

(<.>) | 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 #

(<..>) :: 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

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

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 #

(-<<) :: 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 #