proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Object.Pushout

Synopsis

Documentation

data Cocone (bs :: LIST k) (a :: COPROD k) where Source Github #

A cocone is a bunch of arrows with a shared target.

Constructors

Coapex :: forall {k} (a1 :: k). Ob a1 => Cocone ('L ('[] :: [k])) ('COPR a1) 
Coleg :: forall {k} (b :: k) (a1 :: k) (bs1 :: [k]). (b ~> a1) -> Cocone ('L bs1) ('COPR a1) -> Cocone ('L (b ': bs1)) ('COPR a1) 

Instances

Instances details
HasCoproducts k => MonoidalProfunctor (Cocone :: LIST k -> COPROD k -> Type) Source Github # 
Instance details

Defined in Proarrow.Object.Pushout

Methods

par0 :: Cocone (Unit :: LIST k) (Unit :: COPROD k) Source Github #

par :: forall (x1 :: LIST k) (x2 :: COPROD k) (y1 :: LIST k) (y2 :: COPROD k). Cocone x1 x2 -> Cocone y1 y2 -> Cocone (x1 ** y1) (x2 ** y2) Source Github #

CategoryOf k => Profunctor (Cocone :: LIST k -> COPROD k -> Type) Source Github # 
Instance details

Defined in Proarrow.Object.Pushout

Methods

dimap :: forall (c :: LIST k) (a :: LIST k) (b :: COPROD k) (d :: COPROD k). (c ~> a) -> (b ~> d) -> Cocone a b -> Cocone c d Source Github #

(\\) :: forall (a :: LIST k) (b :: COPROD k) r. ((Ob a, Ob b) => r) -> Cocone a b -> r Source Github #

data Sink (as :: [k]) where Source Github #

A sink is a cocone, but with the apex type hidden by an existential.

Constructors

Cocone :: forall {k} (as :: [k]) (a :: k). Cocone ('L as) ('COPR a) -> Sink as 

class HasCoproducts k => HasPushouts k where Source Github #

Pushouts are an inherently dependently typed concept: The type of the apex object depends on the values of the given arrows. But at runtime we can still calculate the arrows and the type, which we hide behind an existential.

Methods

pushout :: forall (o :: k) (a :: k) (b :: k). (o ~> a) -> (o ~> b) -> Sink '[a, b] Source Github #

Instances

Instances details
HasPushouts FINSET Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinSet

Methods

pushout :: forall (o :: FINSET) (a :: FINSET) (b :: FINSET). (o ~> a) -> (o ~> b) -> Sink '[a, b] Source Github #

HasPullbacks k => HasPushouts (OPPOSITE k) Source Github # 
Instance details

Defined in Proarrow.Object.Pushout

Methods

pushout :: forall (o :: OPPOSITE k) (a :: OPPOSITE k) (b :: OPPOSITE k). (o ~> a) -> (o ~> b) -> Sink '[a, b] Source Github #

coequalizer :: forall {k} (a :: k) (b :: k). HasPushouts k => (a ~> b) -> (a ~> b) -> Sink '[b] Source Github #

cokernel :: forall k (a :: k) (b :: k). (HasPushouts k, HasZeroObject k) => (a ~> b) -> Sink '[b] Source Github #

Orphan instances

HasPushouts k => HasPullbacks (OPPOSITE k) Source Github # 
Instance details

Methods

pullback :: forall (o :: OPPOSITE k) (a :: OPPOSITE k) (b :: OPPOSITE k). (a ~> o) -> (b ~> o) -> Cosink '[a, b] Source Github #