proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Object.Pullback

Synopsis

Documentation

data Cone (a :: PROD k) (bs :: LIST k) where Source Github #

A cone is a bunch of arrows with a shared source.

Constructors

Apex :: forall {k} (a1 :: k). Ob a1 => Cone ('PR a1) ('L ('[] :: [k])) 
Leg :: forall {k} (a1 :: k) (b :: k) (bs1 :: [k]). (a1 ~> b) -> Cone ('PR a1) ('L bs1) -> Cone ('PR a1) ('L (b ': bs1)) 

Instances

Instances details
HasProducts k => MonoidalProfunctor (Cone :: PROD k -> LIST k -> Type) Source Github # 
Instance details

Defined in Proarrow.Object.Pullback

Methods

par0 :: Cone (Unit :: PROD k) (Unit :: LIST k) Source Github #

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

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

Defined in Proarrow.Object.Pullback

Methods

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

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

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

A cosink (a.k.a a source) is a cone, but with the apex type hidden by an existential.

Constructors

Cone :: forall {k} (a :: k) (as :: [k]). Cone ('PR a) ('L as) -> Cosink as 

class HasProducts k => HasPullbacks k where Source Github #

Pullbacks 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

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

Instances

Instances details
HasPullbacks FINSET Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinSet

Methods

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

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

Defined in Proarrow.Object.Pushout

Methods

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

equalizer :: forall {k} (a :: k) (b :: k). HasPullbacks k => (a ~> b) -> (a ~> b) -> Cosink '[a] Source Github #

kernel :: forall k (a :: k) (b :: k). (HasPullbacks k, HasZeroObject k) => (a ~> b) -> Cosink '[a] Source Github #

class InternalIn (ik :: k) k1 where Source Github #

Associated Types

type C0 (ik :: k) :: k1 Source Github #

type C1 (ik :: k) :: k1 Source Github #

Methods

source :: (C1 ik :: k1) ~> (C0 ik :: k1) Source Github #

target :: (C1 ik :: k1) ~> (C0 ik :: k1) Source Github #

identity :: (C0 ik :: k1) ~> (C1 ik :: k1) Source Github #

compose :: Cosink '[C1 ik :: k1, C1 ik :: k1, C1 ik :: k1] Source Github #

Instances

Instances details
InternalIn BOOL FINSET Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinSet

Associated Types

type C0 BOOL 
Instance details

Defined in Proarrow.Category.Instance.FinSet

type C0 BOOL = 'FS Nat2
type C1 BOOL 
Instance details

Defined in Proarrow.Category.Instance.FinSet

type C1 BOOL = 'FS Nat3