proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Enriched

Synopsis

Documentation

class (Monoidal v, Profunctor p, Enriched v j, Enriched v k) => EnrichedProfunctor v (p :: j +-> k) where Source Github #

Working with enriched categories and profunctors in Haskell is hard. Instead we encode them using the underlying regular category/profunctor, and show that the enriched structure can be recovered.

Associated Types

type ProObj v (p :: j +-> k) (a :: k) (b :: j) :: v Source Github #

Methods

withProObj :: forall (a :: k) (b :: j) r. (Ob a, Ob b) => (Ob (ProObj v p a b) => r) -> r Source Github #

underlying :: forall (a :: k) (b :: j). p a b -> (Unit :: v) ~> ProObj v p a b Source Github #

enriched :: forall (a :: k) (b :: j). (Ob a, Ob b) => ((Unit :: v) ~> ProObj v p a b) -> p a b Source Github #

rmap :: forall (a :: k) (b :: j) (c :: j). (Ob a, Ob b, Ob c) => (HomObj v b c ** ProObj v p a b) ~> ProObj v p a c Source Github #

lmap :: forall (a :: k) (b :: j) (c :: k). (Ob a, Ob b, Ob c) => (HomObj v c a ** ProObj v p a b) ~> ProObj v p c b Source Github #

Instances

Instances details
(ThinProfunctor p, Thin j, Thin k) => EnrichedProfunctor CONSTRAINT (p :: j +-> k) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched

Methods

withProObj :: forall (a :: k) (b :: j) r. (Ob a, Ob b) => (Ob (ProObj CONSTRAINT p a b) => r) -> r Source Github #

underlying :: forall (a :: k) (b :: j). p a b -> (Unit :: CONSTRAINT) ~> ProObj CONSTRAINT p a b Source Github #

enriched :: forall (a :: k) (b :: j). (Ob a, Ob b) => ((Unit :: CONSTRAINT) ~> ProObj CONSTRAINT p a b) -> p a b Source Github #

rmap :: forall (a :: k) (b :: j) (c :: j). (Ob a, Ob b, Ob c) => (HomObj CONSTRAINT b c ** ProObj CONSTRAINT p a b) ~> ProObj CONSTRAINT p a c Source Github #

lmap :: forall (a :: k) (b :: j) (c :: k). (Ob a, Ob b, Ob c) => (HomObj CONSTRAINT c a ** ProObj CONSTRAINT p a b) ~> ProObj CONSTRAINT p c b Source Github #

CodiscreteProfunctor p => EnrichedProfunctor () (p :: j +-> k) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched

Methods

withProObj :: forall (a :: k) (b :: j) r. (Ob a, Ob b) => (Ob (ProObj () p a b) => r) -> r Source Github #

underlying :: forall (a :: k) (b :: j). p a b -> (Unit :: ()) ~> ProObj () p a b Source Github #

enriched :: forall (a :: k) (b :: j). (Ob a, Ob b) => ((Unit :: ()) ~> ProObj () p a b) -> p a b Source Github #

rmap :: forall (a :: k) (b :: j) (c :: j). (Ob a, Ob b, Ob c) => (HomObj () b c ** ProObj () p a b) ~> ProObj () p a c Source Github #

lmap :: forall (a :: k) (b :: j) (c :: k). (Ob a, Ob b, Ob c) => (HomObj () c a ** ProObj () p a b) ~> ProObj () p c b Source Github #

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

Defined in Proarrow.Category.Enriched

Methods

withProObj :: forall (a :: k) (b :: j) r. (Ob a, Ob b) => (Ob (ProObj Type p a b) => r) -> r Source Github #

underlying :: forall (a :: k) (b :: j). p a b -> (Unit :: Type) ~> ProObj Type p a b Source Github #

enriched :: forall (a :: k) (b :: j). (Ob a, Ob b) => ((Unit :: Type) ~> ProObj Type p a b) -> p a b Source Github #

rmap :: forall (a :: k) (b :: j) (c :: j). (Ob a, Ob b, Ob c) => (HomObj Type b c ** ProObj Type p a b) ~> ProObj Type p a c Source Github #

lmap :: forall (a :: k) (b :: j) (c :: k). (Ob a, Ob b, Ob c) => (HomObj Type c a ** ProObj Type p a b) ~> ProObj Type p c b Source Github #

DaggerProfunctor p => EnrichedProfunctor (Type, Type) (p :: j +-> j) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched

Methods

withProObj :: forall (a :: j) (b :: j) r. (Ob a, Ob b) => (Ob (ProObj (Type, Type) p a b) => r) -> r Source Github #

underlying :: forall (a :: j) (b :: j). p a b -> (Unit :: (Type, Type)) ~> ProObj (Type, Type) p a b Source Github #

enriched :: forall (a :: j) (b :: j). (Ob a, Ob b) => ((Unit :: (Type, Type)) ~> ProObj (Type, Type) p a b) -> p a b Source Github #

rmap :: forall (a :: j) (b :: j) (c :: j). (Ob a, Ob b, Ob c) => (HomObj (Type, Type) b c ** ProObj (Type, Type) p a b) ~> ProObj (Type, Type) p a c Source Github #

lmap :: forall (a :: j) (b :: j) (c :: j). (Ob a, Ob b, Ob c) => (HomObj (Type, Type) c a ** ProObj (Type, Type) p a b) ~> ProObj (Type, Type) p c b Source Github #

EnrichedProfunctor v p => EnrichedProfunctor (Clone v) (Op p :: OPPOSITE j -> OPPOSITE k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched

Methods

withProObj :: forall (a :: OPPOSITE j) (b :: OPPOSITE k) r. (Ob a, Ob b) => (Ob (ProObj (Clone v) (Op p) a b) => r) -> r Source Github #

underlying :: forall (a :: OPPOSITE j) (b :: OPPOSITE k). Op p a b -> (Unit :: Clone v) ~> ProObj (Clone v) (Op p) a b Source Github #

enriched :: forall (a :: OPPOSITE j) (b :: OPPOSITE k). (Ob a, Ob b) => ((Unit :: Clone v) ~> ProObj (Clone v) (Op p) a b) -> Op p a b Source Github #

rmap :: forall (a :: OPPOSITE j) (b :: OPPOSITE k) (c :: OPPOSITE k). (Ob a, Ob b, Ob c) => (HomObj (Clone v) b c ** ProObj (Clone v) (Op p) a b) ~> ProObj (Clone v) (Op p) a c Source Github #

lmap :: forall (a :: OPPOSITE j) (b :: OPPOSITE k) (c :: OPPOSITE j). (Ob a, Ob b, Ob c) => (HomObj (Clone v) c a ** ProObj (Clone v) (Op p) a b) ~> ProObj (Clone v) (Op p) c b Source Github #

Monoid m => EnrichedProfunctor (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) Source Github #

A monoid is a one object enriched category.

Instance details

Defined in Proarrow.Category.Enriched

Methods

withProObj :: forall (a :: MONOIDK m) (b :: MONOIDK m) r. (Ob a, Ob b) => (Ob (ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) a b) => r) -> r Source Github #

underlying :: forall (a :: MONOIDK m) (b :: MONOIDK m). Mon a b -> (Unit :: Clone k) ~> ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) a b Source Github #

enriched :: forall (a :: MONOIDK m) (b :: MONOIDK m). (Ob a, Ob b) => ((Unit :: Clone k) ~> ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) a b) -> Mon a b Source Github #

rmap :: forall (a :: MONOIDK m) (b :: MONOIDK m) (c :: MONOIDK m). (Ob a, Ob b, Ob c) => (HomObj (Clone k) b c ** ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) a b) ~> ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) a c Source Github #

lmap :: forall (a :: MONOIDK m) (b :: MONOIDK m) (c :: MONOIDK m). (Ob a, Ob b, Ob c) => (HomObj (Clone k) c a ** ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) a b) ~> ProObj (Clone k) (Mon :: MONOIDK m -> MONOIDK m -> Type) c b Source Github #

class EnrichedProfunctor v (Hom k) => Enriched v k Source Github #

Instances

Instances details
EnrichedProfunctor v (Hom k) => Enriched v k Source Github # 
Instance details

Defined in Proarrow.Category.Enriched

type HomObj v (a :: k) (b :: k) = ProObj v (Hom k) a b Source Github #

comp :: forall {k} v (a :: k) (b :: k) (c :: k). (Enriched v k, Ob a, Ob b, Ob c) => (HomObj v b c ** HomObj v a b) ~> HomObj v a c Source Github #

type HomSelf (a :: k) (b :: k) = a ~~> b Source Github #

Closed monoidal categories are enriched in themselves.

underlyingSelf :: forall k (a :: k) (b :: k). Closed k => (a ~> b) -> (Unit :: k) ~> HomSelf a b Source Github #

enrichedSelf :: forall k (a :: k) (b :: k). (Closed k, Ob a, Ob b) => ((Unit :: k) ~> HomSelf a b) -> a ~> b Source Github #

compSelf :: forall {k} (a :: k) (b :: k) (c :: k). (Closed k, Ob a, Ob b, Ob c) => (HomSelf b c ** HomSelf a b) ~> HomSelf a c Source Github #

type Clone k = SUBCAT (Any :: k -> Constraint) Source Github #

data GenArrow (n :: OPPOSITE v) (a :: k) (b :: k) where Source Github #

A generalized arrow of an enriched category. If k is both powered and copowered, this is an adjunction.

Constructors

GenArrow :: forall {k} (a :: k) (b :: k) v (n1 :: v). (Ob a, Ob b) => (n1 ~> HomObj v a b) -> GenArrow ('OP n1) a b 

Instances

Instances details
(Ob n, Enriched v k, CategoryOf k) => Profunctor (GenArrow ('OP n) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched

Methods

dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> GenArrow ('OP n) a b -> GenArrow ('OP n) c d Source Github #

lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> GenArrow ('OP n) a b -> GenArrow ('OP n) c b Source Github #

rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> GenArrow ('OP n) a b -> GenArrow ('OP n) a d Source Github #

(\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> GenArrow ('OP n) a b -> r Source Github #

(Copowered v k, Ob n) => Corepresentable (GenArrow ('OP n) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Object.Copower

Methods

coindex :: forall (a :: k) (b :: k). GenArrow ('OP n) a b -> ((GenArrow ('OP n) :: k -> k -> Type) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: k). Ob a => (((GenArrow ('OP n) :: k -> k -> Type) %% a) ~> b) -> GenArrow ('OP n) a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> ((GenArrow ('OP n) :: k -> k -> Type) %% a) ~> ((GenArrow ('OP n) :: k -> k -> Type) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => GenArrow ('OP n) a ((GenArrow ('OP n) :: k -> k -> Type) %% a) Source Github #

(Powered v k, Ob n) => Representable (GenArrow ('OP n) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Object.Power

Methods

index :: forall (a :: k) (b :: k). GenArrow ('OP n) a b -> a ~> ((GenArrow ('OP n) :: k -> k -> Type) % b) Source Github #

tabulate :: forall (b :: k) (a :: k). Ob b => (a ~> ((GenArrow ('OP n) :: k -> k -> Type) % b)) -> GenArrow ('OP n) a b Source Github #

repMap :: forall (a :: k) (b :: k). (a ~> b) -> ((GenArrow ('OP n) :: k -> k -> Type) % a) ~> ((GenArrow ('OP n) :: k -> k -> Type) % b) Source Github #

repUniv :: forall (a :: k). Ob a => GenArrow ('OP n) ((GenArrow ('OP n) :: k -> k -> Type) % a) a Source Github #

type (GenArrow ('OP n) :: k -> k -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Object.Copower

type (GenArrow ('OP n) :: k -> k -> Type) %% (a :: k) = n *. a
type (GenArrow ('OP n) :: k -> k -> Type) % (a :: k) Source Github # 
Instance details

Defined in Proarrow.Object.Power

type (GenArrow ('OP n) :: k -> k -> Type) % (a :: k) = a ^ n