proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Coproduct

Documentation

data ((p :: j +-> k) :+: (q :: j +-> k)) (a :: k) (b :: j) where Source Comments #

Constructors

InjL :: forall {j} {k} (p :: j +-> k) (a :: k) (b :: j) (q :: j +-> k). p a b -> (p :+: q) a b 
InjR :: forall {j} {k} (q :: j +-> k) (a :: k) (b :: j) (p :: j +-> k). q a b -> (p :+: q) a b 

Instances

Instances details
(Strong Type p, Strong Type q) => Strong Type (p :+: q :: d -> c -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Coproduct

Methods

act :: forall a b (x :: d) (y :: c). (a ~> b) -> (p :+: q) x y -> (p :+: q) (Act a x) (Act b y) Source Comments #

(Profunctor p, Profunctor q) => Profunctor (p :+: q :: k -> j -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Coproduct

Methods

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

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

(DaggerProfunctor p, DaggerProfunctor q) => DaggerProfunctor (p :+: q :: k -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Coproduct

Methods

dagger :: forall (a :: k) (b :: k). (p :+: q) a b -> (p :+: q) b a Source Comments #

(Cotraversable p, Cotraversable q) => Cotraversable (p :+: q :: k -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p0 :: k +-> k). (DistributiveProfunctor p0, Strong k p0, SelfAction k) => (p0 :.: (p :+: q)) :~> ((p :+: q) :.: p0) Source Comments #

(Traversable p, Traversable q) => Traversable (p :+: q :: k -> k -> Type) Source Comments # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

traverse :: forall (p0 :: k +-> k). (DistributiveProfunctor p0, Strong k p0, SelfAction k) => ((p :+: q) :.: p0) :~> (p0 :.: (p :+: q)) Source Comments #

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

Defined in Proarrow.Profunctor.Coproduct

Methods

map :: forall (a :: j +-> k) (b :: j +-> k). (a ~> b) -> (p :+: a) ~> (p :+: b) Source Comments #

Profunctor p => Promonad (Star ((:+:) p) :: (k -> j -> Type) -> (j +-> k) -> Type) Source Comments # 
Instance details

Defined in Proarrow.Profunctor.Star

Methods

id :: forall (a :: k -> j -> Type). Ob a => Star ((:+:) p) a a Source Comments #

(.) :: forall (b :: k -> j -> Type) (c :: k -> j -> Type) (a :: k -> j -> Type). Star ((:+:) p) b c -> Star ((:+:) p) a b -> Star ((:+:) p) a c Source Comments #

coproduct :: forall {k} {j} p (x :: k) (y :: j) r q. (p x y -> r) -> (q x y -> r) -> (p :+: q) x y -> r Source Comments #