papa-include-0.1.0: Third party libraries

Safe HaskellSafe
LanguageHaskell2010

Papa.Include.Data.Functor.Apply

Synopsis

Documentation

(*>) :: Apply f => f a -> f b -> f b Source #

(>>) :: Apply f => f a -> f b -> f b Source #

(<*) :: Apply f => f b -> f a -> f b Source #

class Functor f => Apply f #

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

(<.>)

Instances

Apply [] 

Methods

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

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

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

Apply Maybe 

Methods

(<.>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

(.>) :: Maybe a -> Maybe b -> Maybe b #

(<.) :: Maybe a -> Maybe b -> Maybe a #

Apply IO 

Methods

(<.>) :: IO (a -> b) -> IO a -> IO b #

(.>) :: IO a -> IO b -> IO b #

(<.) :: IO a -> IO b -> IO a #

Apply Identity 

Methods

(<.>) :: Identity (a -> b) -> Identity a -> Identity b #

(.>) :: Identity a -> Identity b -> Identity b #

(<.) :: Identity a -> Identity b -> Identity a #

Apply Option 

Methods

(<.>) :: Option (a -> b) -> Option a -> Option b #

(.>) :: Option a -> Option b -> Option b #

(<.) :: Option a -> Option b -> Option a #

Apply NonEmpty 

Methods

(<.>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

(.>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<.) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Apply ZipList 

Methods

(<.>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

(.>) :: ZipList a -> ZipList b -> ZipList b #

(<.) :: ZipList a -> ZipList b -> ZipList a #

Apply Tree 

Methods

(<.>) :: Tree (a -> b) -> Tree a -> Tree b #

(.>) :: Tree a -> Tree b -> Tree b #

(<.) :: Tree a -> Tree b -> Tree a #

Apply Seq 

Methods

(<.>) :: Seq (a -> b) -> Seq a -> Seq b #

(.>) :: Seq a -> Seq b -> Seq b #

(<.) :: Seq a -> Seq b -> Seq a #

Apply IntMap

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

Methods

(<.>) :: IntMap (a -> b) -> IntMap a -> IntMap b #

(.>) :: IntMap a -> IntMap b -> IntMap b #

(<.) :: IntMap a -> IntMap b -> IntMap a #

Apply ((->) m) 

Methods

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

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

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

Apply (Either a) 

Methods

(<.>) :: Either a (a -> b) -> Either a a -> Either a b #

(.>) :: Either a a -> Either a b -> Either a b #

(<.) :: Either a a -> Either a b -> Either a a #

Semigroup m => Apply ((,) m) 

Methods

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

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

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

Monad m => Apply (WrappedMonad m) 

Methods

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

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

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

Ord k => Apply (Map k)

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

Methods

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

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

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

Apply m => Apply (ListT m) 

Methods

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

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

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

Applicative f => Apply (WrappedApplicative f) 
Apply f => Apply (MaybeApply f) 

Methods

(<.>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b #

(.>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b #

(<.) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a #

Apply f => Apply (Lift f) 

Methods

(<.>) :: Lift f (a -> b) -> Lift f a -> Lift f b #

(.>) :: Lift f a -> Lift f b -> Lift f b #

(<.) :: Lift f a -> Lift f b -> Lift f a #

(Functor m, Monad m) => Apply (MaybeT m) 

Methods

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

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

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

Arrow a => Apply (WrappedArrow a b) 

Methods

(<.>) :: WrappedArrow a b (a -> b) -> WrappedArrow a b a -> WrappedArrow a b b #

(.>) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b b #

(<.) :: WrappedArrow a b a -> WrappedArrow a b b -> WrappedArrow a b a #

Semigroup m => Apply (Const * m) 

Methods

(<.>) :: Const * m (a -> b) -> Const * m a -> Const * m b #

(.>) :: Const * m a -> Const * m b -> Const * m b #

(<.) :: Const * m a -> Const * m b -> Const * m a #

Biapply p => Apply (Join * p) 

Methods

(<.>) :: Join * p (a -> b) -> Join * p a -> Join * p b #

(.>) :: Join * p a -> Join * p b -> Join * p b #

(<.) :: Join * p a -> Join * p b -> Join * p a #

Apply w => Apply (TracedT m w) 

Methods

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

(.>) :: TracedT m w a -> TracedT m w b -> TracedT m w b #

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

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

Methods

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

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

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

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

Methods

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

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

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

Apply (Cokleisli w a) 

Methods

(<.>) :: Cokleisli w a (a -> b) -> Cokleisli w a a -> Cokleisli w a b #

(.>) :: Cokleisli w a a -> Cokleisli w a b -> Cokleisli w a b #

(<.) :: Cokleisli w a a -> Cokleisli w a b -> Cokleisli w a a #

Apply w => Apply (IdentityT * w) 

Methods

(<.>) :: IdentityT * w (a -> b) -> IdentityT * w a -> IdentityT * w b #

(.>) :: IdentityT * w a -> IdentityT * w b -> IdentityT * w b #

(<.) :: IdentityT * w a -> IdentityT * w b -> IdentityT * w a #

Apply f => Apply (Backwards * f) 

Methods

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

(.>) :: Backwards * f a -> Backwards * f b -> Backwards * f b #

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

(Functor m, Monad m) => Apply (ErrorT e m) 

Methods

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

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

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

(Functor m, Monad m) => Apply (ExceptT e m) 

Methods

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

(.>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

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

Bind m => Apply (StateT s m) 

Methods

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

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

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

Bind m => Apply (StateT s m) 

Methods

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

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

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

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

Methods

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

(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

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

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

Methods

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

(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

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

Apply f => Apply (Reverse * f) 

Methods

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

(.>) :: Reverse * f a -> Reverse * f b -> Reverse * f b #

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

Semigroup f => Apply (Constant * f) 

Methods

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

(.>) :: Constant * f a -> Constant * f b -> Constant * f b #

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

(Apply f, Apply g) => Apply (Product * f g) 

Methods

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

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

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

Apply (ContT * r m) 

Methods

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

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

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

Apply m => Apply (ReaderT * e m) 

Methods

(<.>) :: ReaderT * e m (a -> b) -> ReaderT * e m a -> ReaderT * e m b #

(.>) :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m b #

(<.) :: ReaderT * e m a -> ReaderT * e m b -> ReaderT * e m a #

(Apply f, Apply g) => Apply (Compose * * f g) 

Methods

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

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

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

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

Methods

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

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

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

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

Methods

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

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

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