Portability  portable 

Stability  provisional 
Maintainer  Edward Kmett <ekmett@gmail.com> 
 class Functor f where
 (<$>) :: Functor f => (a > b) > f a > f b
 ($>) :: Functor f => f a > b > f b
 class Functor f => Apply f where
 (<..>) :: Apply w => w a > w (a > b) > w b
 liftF2 :: Apply w => (a > b > c) > w a > w b > w c
 liftF3 :: Apply w => (a > b > c > d) > w a > w b > w c > w d
 newtype WrappedApplicative f a = WrapApplicative {
 unwrapApplicative :: f a
 newtype MaybeApply f a = MaybeApply {
 runMaybeApply :: Either (f a) a
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, Data.Maybe.Maybe
and System.IO.IO
satisfy these laws.
Apply  a strong lax semimonoidal endofunctor
class Functor f => Apply f whereSource
A strong lax semimonoidal endofunctor.
This is equivalent to an Applicative
without pure
.
Laws:
associative composition: (.) <$> u <.> v <.> w = u <.> (v <.> w)
(<.>) :: f (a > b) > f a > f bSource
(.>) :: f a > f b > f bSource
(<.) :: f a > f b > f aSource
a . b = const <$ a . b
Apply []  
Apply IO  
Apply ZipList  
Apply Maybe  
Apply Tree  
Apply Seq  
Apply IntMap  An IntMap is not 
Apply Option  
Apply Identity  
Apply ((>) m)  
Apply (Either a)  
Semigroup m => Apply ((,) m)  
Semigroup m => Apply (Const m)  
Monad m => Apply (WrappedMonad m)  
Ord k => Apply (Map k)  A Map is not 
Apply m => Apply (MaybeT m)  
Apply m => Apply (ListT m)  
Apply w => Apply (IdentityT w)  
Apply f => Apply (MaybeApply f)  
Applicative f => Apply (WrappedApplicative f)  
Arrow a => Apply (WrappedArrow a b)  
Apply (Cokleisli w a)  
(Apply m, Semigroup w) => Apply (WriterT w m)  
(Apply m, Semigroup w) => Apply (WriterT w m)  
Bind m => Apply (StateT s m)  
Bind m => Apply (StateT s m)  
Apply m => Apply (ReaderT e m)  
Apply m => Apply (ErrorT e m)  
Apply (ContT r m)  
(Apply f, Apply g) => Apply (Compose f g)  
(Apply f, Apply g) => Apply (Product f g)  
(Bind m, Semigroup w) => Apply (RWST r w s m)  
(Bind m, Semigroup w) => Apply (RWST r w s m) 
liftF2 :: Apply w => (a > b > c) > w a > w b > w cSource
Lift a binary function into a comonad with zipping
liftF3 :: Apply w => (a > b > c > d) > w a > w b > w c > w dSource
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
WrapApplicative  

Functor f => Functor (WrappedApplicative f)  
Applicative f => Applicative (WrappedApplicative f)  
Applicative f => Apply (WrappedApplicative f)  
Alternative f => Alt (WrappedApplicative f)  
Alternative f => ApplicativeAlt (WrappedApplicative f) 
newtype MaybeApply f a Source
Transform a Apply into an Applicative by adding a unit.
MaybeApply  

Functor f => Functor (MaybeApply f)  
Apply f => Applicative (MaybeApply f)  
Comonad f => Comonad (MaybeApply f)  
Extend f => Extend (MaybeApply f)  
Apply f => Apply (MaybeApply f)  
ComonadApply w => ComonadApply (MaybeApply w) 