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

Proarrow.Category.Monoidal.Applicative

Documentation

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

Methods

pure :: forall (a :: j). ((Unit :: j) ~> a) -> (Unit :: k) ~> 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 NonEmpty Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: ((Unit :: Type) ~> a) -> (Unit :: Type) ~> NonEmpty a Source Comments #

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

Applicative IO Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: ((Unit :: Type) ~> a) -> (Unit :: Type) ~> IO a Source Comments #

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

Applicative Maybe Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: ((Unit :: Type) ~> a) -> (Unit :: Type) ~> 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 :: ((Unit :: Type) ~> a) -> (Unit :: Type) ~> [a] Source Comments #

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

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

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: ((Unit :: Type) ~> a) -> (Unit :: Type) ~> Either e a Source Comments #

liftA2 :: (Ob a, Ob b) => ((a ** b) ~> c) -> (Either e a ** Either e b) ~> Either e c Source Comments #

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

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: ((Unit :: Type) ~> a0) -> (Unit :: Type) ~> (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 :: ((Unit :: Type) ~> a) -> (Unit :: Type) ~> Prelude f a Source Comments #

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

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

Defined in Proarrow.Profunctor.Free

Methods

pure :: forall (a :: k). ((Unit :: k) ~> a) -> (Unit :: Type) ~> 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 :: ((Unit :: Type) ~> a0) -> (Unit :: Type) ~> (a -> a0) Source Comments #

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

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

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pure :: forall (a :: j). ((Unit :: j) ~> a) -> (Unit :: Type) ~> 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 (Distributive j, Applicative f) => Alternative (f :: j -> k) where Source Comments #

Methods

empty :: forall (a :: j). Ob a => (Unit :: k) ~> 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 IO Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

empty :: Ob a => (Unit :: Type) ~> IO a Source Comments #

alt :: (Ob a, Ob b) => ((a || b) ~> c) -> (IO a ** IO b) ~> IO c Source Comments #

Alternative Maybe Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

empty :: Ob a => (Unit :: Type) ~> Maybe a Source Comments #

alt :: (Ob a, Ob b) => ((a || b) ~> c) -> (Maybe a ** Maybe b) ~> Maybe c Source Comments #

Alternative [] Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

empty :: Ob a => (Unit :: Type) ~> [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 => (Unit :: Type) ~> Prelude f a Source Comments #

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