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). ((a && b) ~> c) -> (f a && f b) ~> f c Source Comments #

Instances

Instances details
Applicative [] Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

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

liftA2 :: ((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 :: ((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 :: ((a && b) ~> c) -> (Prelude f a && Prelude f b) ~> Prelude 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 :: ((a0 && b) ~> c) -> ((a -> a0) && (a -> b)) ~> (a -> c) Source Comments #

class Profunctor p => Proapplicative (p :: PRO j k) where Source Comments #

Methods

pureP :: forall (a :: j) (b :: k). Ob a => El b -> p a b Source Comments #

apP :: forall (a :: j) (b :: k) (c :: k). p a b -> p a c -> p a (b && c) Source Comments #

Instances

Instances details
Applicative f => Proapplicative (Star f :: j -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

pureP :: forall (a :: j) (b :: k). Ob a => El b -> Star f a b Source Comments #

apP :: forall (a :: j) (b :: k) (c :: k). Star f a b -> Star f a c -> Star f a (b && c) Source Comments #

data App (p :: PRO j k) (a :: PROD j) (b :: PROD k) where Source Comments #

Constructors

App :: forall {j} {k} (p :: PRO j k) (a1 :: j) (b1 :: k). p a1 b1 -> App p ('PR a1) ('PR b1) 

Instances

Instances details
(HasProducts j, HasProducts k, Proapplicative p) => MonoidalProfunctor (App p :: PROD j -> PROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

lift0 :: App p (Unit :: PROD j) (Unit :: PROD k) Source Comments #

lift2 :: forall (x1 :: PROD j) (x2 :: PROD k) (y1 :: PROD j) (y2 :: PROD k). App p x1 x2 -> App p y1 y2 -> App p (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor p => Profunctor (App p :: PROD j -> PROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

dimap :: forall (c :: PROD j) (a :: PROD j) (b :: PROD k) (d :: PROD k). (c ~> a) -> (b ~> d) -> App p a b -> App p c d Source Comments #

(\\) :: forall (a :: PROD j) (b :: PROD k) r. ((Ob a, Ob b) => r) -> App p a b -> r Source Comments #

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

Methods

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

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

Instances

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

Defined in Proarrow.Category.Monoidal.Applicative

Methods

empty :: El (Prelude f a) Source Comments #

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

class Proapplicative p => Proalternative (p :: PRO j k) where Source Comments #

Methods

emptyP :: forall (a :: j) (b :: k). (Ob a, Ob b) => p a b Source Comments #

altP :: forall (a :: j) (b :: k). p a b -> p a b -> p a b Source Comments #

Instances

Instances details
Alternative f => Proalternative (Star f :: j -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

emptyP :: forall (a :: j) (b :: k). (Ob a, Ob b) => Star f a b Source Comments #

altP :: forall (a :: j) (b :: k). Star f a b -> Star f a b -> Star f a b Source Comments #

data Alt (p :: PRO j k) (a :: PROD j) (b :: COPROD k) where Source Comments #

Constructors

Alt :: forall {j} {k} (p :: PRO j k) (a1 :: j) (b1 :: k). p a1 b1 -> Alt p ('PR a1) ('COPR b1) 

Instances

Instances details
(HasProducts j, HasCoproducts k, Proalternative p) => MonoidalProfunctor (Alt p :: PROD j -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

lift0 :: Alt p (Unit :: PROD j) (Unit :: COPROD k) Source Comments #

lift2 :: forall (x1 :: PROD j) (x2 :: COPROD k) (y1 :: PROD j) (y2 :: COPROD k). Alt p x1 x2 -> Alt p y1 y2 -> Alt p (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor p => Profunctor (Alt p :: PROD j -> COPROD k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Applicative

Methods

dimap :: forall (c :: PROD j) (a :: PROD j) (b :: COPROD k) (d :: COPROD k). (c ~> a) -> (b ~> d) -> Alt p a b -> Alt p c d Source Comments #

(\\) :: forall (a :: PROD j) (b :: COPROD k) r. ((Ob a, Ob b) => r) -> Alt p a b -> r Source Comments #