proarrow-0: Category theory with a central role for profunctors
Safe HaskellNone
LanguageHaskell2010

Proarrow.Category.Monoidal.Applicative

Documentation

class (HasProducts j, HasProducts k, Functor f) => Applicative (f :: j -> k) where Source Comments #

Methods

pure :: forall (a :: j). El a -> El (f a) Source Comments #

liftA2 :: forall (a :: j) (b :: j) (c :: j). (Ob a, Ob b) => ((a && b) ~> c) -> (f a && f b) ~> f c Source Comments #

Instances

Instances details
Applicative Maybe Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: El a -> El (Maybe a) Source Comments #

liftA2 :: (Ob a, Ob b) => ((a && b) ~> c) -> (Maybe a && Maybe b) ~> Maybe c Source Comments #

Applicative [] Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: El a -> El [a] Source Comments #

liftA2 :: (Ob a, Ob b) => ((a && b) ~> c) -> ([a] && [b]) ~> [c] Source Comments #

Monoid a => Applicative ((,) a :: Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: El a0 -> El (a, a0) Source Comments #

liftA2 :: (Ob a0, Ob b) => ((a0 && b) ~> c) -> ((a, a0) && (a, b)) ~> (a, c) Source Comments #

Applicative f => Applicative (Prelude f :: Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: El a -> El (Prelude f a) Source Comments #

liftA2 :: (Ob a, Ob b) => ((a && b) ~> c) -> (Prelude f a && Prelude f b) ~> Prelude f c Source Comments #

(HasProducts k, Functor f) => Applicative (Ap f :: k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Free

Methods

pure :: forall (a :: k). El a -> El (Ap f a) Source Comments #

liftA2 :: forall (a :: k) (b :: k) (c :: k). (Ob a, Ob b) => ((a && b) ~> c) -> (Ap f a && Ap f b) ~> Ap f c Source Comments #

Applicative ((->) a :: Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: El a0 -> El (a -> a0) Source Comments #

liftA2 :: (Ob a0, Ob b) => ((a0 && b) ~> c) -> ((a -> a0) && (a -> b)) ~> (a -> c) Source Comments #

(MonoidalProfunctor p, Ob x, Cartesian j, Cartesian k) => Applicative (FromProfunctor p x :: j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: forall (a :: j). El a -> El (FromProfunctor p x a) Source Comments #

liftA2 :: forall (a :: j) (b :: j) (c :: j). (Ob a, Ob b) => ((a && b) ~> c) -> (FromProfunctor p x a && FromProfunctor p x b) ~> FromProfunctor p x c Source Comments #

class (HasCoproducts j, Applicative f) => Alternative (f :: j -> k) where Source Comments #

Methods

empty :: forall (a :: j). Ob a => El (f a) Source Comments #

alt :: forall (a :: j) (b :: j) (c :: j). (Ob a, Ob b) => ((a || b) ~> c) -> (f a && f b) ~> f c Source Comments #

Instances

Instances details
Alternative [] Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

empty :: Ob a => El [a] Source Comments #

alt :: (Ob a, Ob b) => ((a || b) ~> c) -> ([a] && [b]) ~> [c] Source Comments #

Alternative f => Alternative (Prelude f :: Type -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

empty :: Ob a => El (Prelude f a) Source Comments #

alt :: (Ob a, Ob b) => ((a || b) ~> c) -> (Prelude f a && Prelude f b) ~> Prelude f c Source Comments #