proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Corepresentable

Description

Corepresentable profunctors, dual to Proarrow.Profunctor.Representable: profunctors of the shape hom preceded by a functor, identifying p a b with p %% a ~> b (functorial action %%). Corep packages any FunctorForRep as its corepresentable profunctor.

Synopsis

Documentation

class Profunctor p => Corepresentable (p :: j +-> k) where Source Github #

A profunctor is corepresentable if p a ? as a copresheaf is representable in a functorial way over a.

Minimal complete definition

coindex, (cotabulate, corepMap | corepUniv)

Associated Types

type (p :: j +-> k) %% (a :: k) :: j infixl 8 Source Github #

Methods

coindex :: forall (a :: k) (b :: j). p a b -> (p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((p %% a) ~> b) -> p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (p %% a) ~> (p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => p a (p %% a) Source Github #

Instances

Instances details
Corepresentable Booleans Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Associated Types

type Booleans %% (x :: BOOL) 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

type Booleans %% (x :: BOOL) = x

Methods

coindex :: forall (a :: BOOL) (b :: BOOL). Booleans a b -> (Booleans %% a) ~> b Source Github #

cotabulate :: forall (a :: BOOL) (b :: BOOL). Ob a => ((Booleans %% a) ~> b) -> Booleans a b Source Github #

corepMap :: forall (a :: BOOL) (b :: BOOL). (a ~> b) -> (Booleans %% a) ~> (Booleans %% b) Source Github #

corepUniv :: forall (a :: BOOL). Ob a => Booleans a (Booleans %% a) Source Github #

Corepresentable (Fold :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Fold

Associated Types

type (Fold :: Type -> Type -> Type) %% (a :: Type) 
Instance details

Defined in Proarrow.Profunctor.Instance.Fold

type (Fold :: Type -> Type -> Type) %% (a :: Type) = [a]

Methods

coindex :: Fold a b -> ((Fold :: Type -> Type -> Type) %% a) ~> b Source Github #

cotabulate :: Ob a => (((Fold :: Type -> Type -> Type) %% a) ~> b) -> Fold a b Source Github #

corepMap :: (a ~> b) -> ((Fold :: Type -> Type -> Type) %% a) ~> ((Fold :: Type -> Type -> Type) %% b) Source Github #

corepUniv :: Ob a => Fold a ((Fold :: Type -> Type -> Type) %% a) Source Github #

CategoryOf k => Corepresentable (Id :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

coindex :: forall (a :: k) (b :: k). Id a b -> ((Id :: k -> k -> Type) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: k). Ob a => (((Id :: k -> k -> Type) %% a) ~> b) -> Id a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> ((Id :: k -> k -> Type) %% a) ~> ((Id :: k -> k -> Type) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Id a ((Id :: k -> k -> Type) %% a) Source Github #

Corepresentable (->) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Associated Types

type (->) %% (a :: Type) 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

type (->) %% (a :: Type) = a

Methods

coindex :: (a -> b) -> ((->) %% a) ~> b Source Github #

cotabulate :: Ob a => (((->) %% a) ~> b) -> a -> b Source Github #

corepMap :: (a ~> b) -> ((->) %% a) ~> ((->) %% b) Source Github #

corepUniv :: Ob a => a -> ((->) %% a) Source Github #

(HasInitialObject j, CategoryOf k) => Corepresentable (TerminalProfunctor :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Colimit.Initial

Methods

coindex :: forall (a :: k) (b :: j). TerminalProfunctor a b -> ((TerminalProfunctor :: k -> j -> Type) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => (((TerminalProfunctor :: k -> j -> Type) %% a) ~> b) -> TerminalProfunctor a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> ((TerminalProfunctor :: k -> j -> Type) %% a) ~> ((TerminalProfunctor :: k -> j -> Type) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => TerminalProfunctor a ((TerminalProfunctor :: k -> j -> Type) %% a) Source Github #

(Ob r, Monoidal k) => Corepresentable (Reader ('OP r) :: k -> k -> Type) Source Github #

The coreader comonad given the Promonad instance. Together with the Representable instance this gives the curry/uncurry adjunction.

Instance details

Defined in Proarrow.Promonad.Reader

Methods

coindex :: forall (a :: k) (b :: k). Reader ('OP r) a b -> (Reader ('OP r) %% a) ~> b Source Github #

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

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Reader ('OP r) %% a) ~> (Reader ('OP r) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Reader ('OP r) a (Reader ('OP r) %% a) Source Github #

(Ob w, CompactClosed k) => Corepresentable (Writer w :: k -> k -> Type) Source Github #

The cowriter comonad given the Promonad instance.

Instance details

Defined in Proarrow.Promonad.Writer

Methods

coindex :: forall (a :: k) (b :: k). Writer w a b -> (Writer w %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: k). Ob a => ((Writer w %% a) ~> b) -> Writer w a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Writer w %% a) ~> (Writer w %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Writer w a (Writer w %% a) Source Github #

Corepresentable (Rep Forget) Source Github #

By creating the left adjoint to the forgetful functor, we obtain the free-forgetful adjunction between Hask and LINEAR

Instance details

Defined in Proarrow.Category.Instance.Linear

Associated Types

type (Rep Forget) %% (a :: Type) 
Instance details

Defined in Proarrow.Category.Instance.Linear

type (Rep Forget) %% (a :: Type) = 'L (Ur a)

Methods

coindex :: forall a (b :: LINEAR). Rep Forget a b -> (Rep Forget %% a) ~> b Source Github #

cotabulate :: forall a (b :: LINEAR). Ob a => ((Rep Forget %% a) ~> b) -> Rep Forget a b Source Github #

corepMap :: (a ~> b) -> (Rep Forget %% a) ~> (Rep Forget %% b) Source Github #

corepUniv :: Ob a => Rep Forget a (Rep Forget %% a) Source Github #

Corepresentable (Star ((->) a) :: Type -> Type -> Type) Source Github #

The left adjoint of ((->) a) is (,) a.

Instance details

Defined in Proarrow.Adjunction

Methods

coindex :: Star ((->) a) a0 b -> (Star ((->) a) %% a0) ~> b Source Github #

cotabulate :: Ob a0 => ((Star ((->) a) %% a0) ~> b) -> Star ((->) a) a0 b Source Github #

corepMap :: (a0 ~> b) -> (Star ((->) a) %% a0) ~> (Star ((->) a) %% b) Source Github #

corepUniv :: Ob a0 => Star ((->) a) a0 (Star ((->) a) %% a0) Source Github #

(Relation p, Representable p) => Corepresentable (Converse p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Rel

Methods

coindex :: forall (a :: k) (b :: j). Converse p a b -> (Converse p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Converse p %% a) ~> b) -> Converse p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Converse p %% a) ~> (Converse p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Converse p a (Converse p %% a) Source Github #

FunctorForRep f => Corepresentable (Corep f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

coindex :: forall (a :: k) (b :: j). Corep f a b -> (Corep f %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Corep f %% a) ~> b) -> Corep f a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Corep f %% a) ~> (Corep f %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Corep f a (Corep f %% a) Source Github #

Corepresentable p => Corepresentable (Adj p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Adj

Methods

coindex :: forall (a :: k) (b :: j). Adj p a b -> (Adj p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Adj p %% a) ~> b) -> Adj p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Adj p %% a) ~> (Adj p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Adj p a (Adj p %% a) Source Github #

Functor f => Corepresentable (Costar f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Costar

Methods

coindex :: forall (a :: k) (b :: j). Costar f a b -> (Costar f %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Costar f %% a) ~> b) -> Costar f a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Costar f %% a) ~> (Costar f %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Costar f a (Costar f %% a) Source Github #

Corepresentable p => Corepresentable (Wrapped p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Wrapped

Methods

coindex :: forall (a :: k) (b :: j). Wrapped p a b -> (Wrapped p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Wrapped p %% a) ~> b) -> Wrapped p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Wrapped p %% a) ~> (Wrapped p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Wrapped p a (Wrapped p %% a) Source Github #

Representable p => Corepresentable (RepCostar p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

coindex :: forall (a :: k) (b :: j). RepCostar p a b -> (RepCostar p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((RepCostar p %% a) ~> b) -> RepCostar p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (RepCostar p %% a) ~> (RepCostar p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => RepCostar p a (RepCostar p %% a) Source Github #

Corepresentable m => Corepresentable (AsRelative m :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad

Methods

coindex :: forall (a :: k) (b :: j). AsRelative m a b -> (AsRelative m %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((AsRelative m %% a) ~> b) -> AsRelative m a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (AsRelative m %% a) ~> (AsRelative m %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => AsRelative m a (AsRelative m %% a) Source Github #

Corepresentable l => Corepresentable (AsLeftAdjoint l :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Universal

Methods

coindex :: forall (a :: k) (b :: j). AsLeftAdjoint l a b -> (AsLeftAdjoint l %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((AsLeftAdjoint l %% a) ~> b) -> AsLeftAdjoint l a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (AsLeftAdjoint l %% a) ~> (AsLeftAdjoint l %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => AsLeftAdjoint l a (AsLeftAdjoint l %% a) Source Github #

(forall (a :: k). Ob a => InitUniversal a r, Representable r) => Corepresentable (AsRightAdjoint r :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Universal

Methods

coindex :: forall (a :: k) (b :: j). AsRightAdjoint r a b -> (AsRightAdjoint r %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((AsRightAdjoint r %% a) ~> b) -> AsRightAdjoint r a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (AsRightAdjoint r %% a) ~> (AsRightAdjoint r %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => AsRightAdjoint r a (AsRightAdjoint r %% a) Source Github #

Corepresentable p => Corepresentable (FromAdjunction p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Universal

Methods

coindex :: forall (a :: k) (b :: j). FromAdjunction p a b -> (FromAdjunction p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((FromAdjunction p %% a) ~> b) -> FromAdjunction p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (FromAdjunction p %% a) ~> (FromAdjunction p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => FromAdjunction p a (FromAdjunction p %% a) Source Github #

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

Defined in Proarrow.Colimit.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 #

(Corepresentable p, Ob r, Monoidal k) => Corepresentable (ReaderT ('OP r) p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

coindex :: forall (a :: k) (b :: k). ReaderT ('OP r) p a b -> (ReaderT ('OP r) p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: k). Ob a => ((ReaderT ('OP r) p %% a) ~> b) -> ReaderT ('OP r) p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (ReaderT ('OP r) p %% a) ~> (ReaderT ('OP r) p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => ReaderT ('OP r) p a (ReaderT ('OP r) p %% a) Source Github #

(Corepresentable p, Ob s, Monoidal k, CompactClosed k) => Corepresentable (StateT s p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.State

Methods

coindex :: forall (a :: k) (b :: k). StateT s p a b -> (StateT s p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: k). Ob a => ((StateT s p %% a) ~> b) -> StateT s p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (StateT s p %% a) ~> (StateT s p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => StateT s p a (StateT s p %% a) Source Github #

(Corepresentable p, Ob w, CompactClosed k) => Corepresentable (WriterT w p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

Methods

coindex :: forall (a :: k) (b :: k). WriterT w p a b -> (WriterT w p %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: k). Ob a => ((WriterT w p %% a) ~> b) -> WriterT w p a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (WriterT w p %% a) ~> (WriterT w p %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => WriterT w p a (WriterT w p %% a) Source Github #

(HasBinaryCoproducts j, Corepresentable p, Corepresentable q) => Corepresentable (p :*: q :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Colimit.BinaryCoproduct

Methods

coindex :: forall (a :: k) (b :: j). (p :*: q) a b -> ((p :*: q) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => (((p :*: q) %% a) ~> b) -> (p :*: q) a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> ((p :*: q) %% a) ~> ((p :*: q) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => (p :*: q) a ((p :*: q) %% a) Source Github #

(Corepresentable p, Corepresentable q) => Corepresentable (p :.: q :: k -> j2 -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

coindex :: forall (a :: k) (b :: j2). (p :.: q) a b -> ((p :.: q) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j2). Ob a => (((p :.: q) %% a) ~> b) -> (p :.: q) a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> ((p :.: q) %% a) ~> ((p :.: q) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => (p :.: q) a ((p :.: q) %% a) Source Github #

(HasColimits j k2, Corepresentable d) => Corepresentable (Rift ('OP j) d :: k1 -> k2 -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Rift

Methods

coindex :: forall (a :: k1) (b :: k2). Rift ('OP j) d a b -> (Rift ('OP j) d %% a) ~> b Source Github #

cotabulate :: forall (a :: k1) (b :: k2). Ob a => ((Rift ('OP j) d %% a) ~> b) -> Rift ('OP j) d a b Source Github #

corepMap :: forall (a :: k1) (b :: k1). (a ~> b) -> (Rift ('OP j) d %% a) ~> (Rift ('OP j) d %% b) Source Github #

corepUniv :: forall (a :: k1). Ob a => Rift ('OP j) d a (Rift ('OP j) d %% a) Source Github #

HasBinaryCoproducts k => Corepresentable (Rep (Diag :: k +-> (k, k)) :: (k, k) -> k -> Type) Source Github #

The left adjoint to the diagonal functor.

Instance details

Defined in Proarrow.Colimit.BinaryCoproduct

Methods

coindex :: forall (a :: (k, k)) (b :: k). Rep (Diag :: k +-> (k, k)) a b -> (Rep (Diag :: k +-> (k, k)) %% a) ~> b Source Github #

cotabulate :: forall (a :: (k, k)) (b :: k). Ob a => ((Rep (Diag :: k +-> (k, k)) %% a) ~> b) -> Rep (Diag :: k +-> (k, k)) a b Source Github #

corepMap :: forall (a :: (k, k)) (b :: (k, k)). (a ~> b) -> (Rep (Diag :: k +-> (k, k)) %% a) ~> (Rep (Diag :: k +-> (k, k)) %% b) Source Github #

corepUniv :: forall (a :: (k, k)). Ob a => Rep (Diag :: k +-> (k, k)) a (Rep (Diag :: k +-> (k, k)) %% a) Source Github #

(Closed k, SymMonoidal k, Ob r) => Corepresentable (Rep (Not r) :: k -> OPPOSITE k -> Type) Source Github #

The Op-Op adjunction, giving rise to the continuation monad.

Instance details

Defined in Proarrow.Category.Monoidal.Closed

Methods

coindex :: forall (a :: k) (b :: OPPOSITE k). Rep (Not r) a b -> (Rep (Not r) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: OPPOSITE k). Ob a => ((Rep (Not r) %% a) ~> b) -> Rep (Not r) a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Rep (Not r) %% a) ~> (Rep (Not r) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Rep (Not r) a (Rep (Not r) %% a) Source Github #

RealFloat a => Corepresentable (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) :: MatK (Complex a) -> MatK (Complex a) -> Type) Source Github #

Conjugation is a self-adjoint functor

Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

coindex :: forall (a0 :: MatK (Complex a)) (b :: MatK (Complex a)). Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) a0 b -> (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) %% a0) ~> b Source Github #

cotabulate :: forall (a0 :: MatK (Complex a)) (b :: MatK (Complex a)). Ob a0 => ((Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) %% a0) ~> b) -> Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) a0 b Source Github #

corepMap :: forall (a0 :: MatK (Complex a)) (b :: MatK (Complex a)). (a0 ~> b) -> (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) %% a0) ~> (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) %% b) Source Github #

corepUniv :: forall (a0 :: MatK (Complex a)). Ob a0 => Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) a0 (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) %% a0) Source Github #

Representable p => Corepresentable (Op p :: OPPOSITE j -> OPPOSITE k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

coindex :: forall (a :: OPPOSITE j) (b :: OPPOSITE k). Op p a b -> (Op p %% a) ~> b Source Github #

cotabulate :: forall (a :: OPPOSITE j) (b :: OPPOSITE k). Ob a => ((Op p %% a) ~> b) -> Op p a b Source Github #

corepMap :: forall (a :: OPPOSITE j) (b :: OPPOSITE j). (a ~> b) -> (Op p %% a) ~> (Op p %% b) Source Github #

corepUniv :: forall (a :: OPPOSITE j). Ob a => Op p a (Op p %% a) Source Github #

HasFree ob => Corepresentable (Rep (Forget ob) :: k -> SUBCAT ob -> Type) Source Github #

By creating the left adjoint to the forgetful functor, we obtain the free-forgetful adjunction.

Instance details

Defined in Proarrow.Profunctor.Free

Methods

coindex :: forall (a :: k) (b :: SUBCAT ob). Rep (Forget ob) a b -> (Rep (Forget ob) %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: SUBCAT ob). Ob a => ((Rep (Forget ob) %% a) ~> b) -> Rep (Forget ob) a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Rep (Forget ob) %% a) ~> (Rep (Forget ob) %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Rep (Forget ob) a (Rep (Forget ob) %% a) Source Github #

Profunctor j2 => Corepresentable (Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) :: (k -> j1 -> Type) -> (i +-> k) -> Type) Source Github #

The right Kan extension is the right adjoint of the precomposition functor.

Instance details

Defined in Proarrow.Profunctor.Instance.Ran

Methods

coindex :: forall (a :: k -> j1 -> Type) (b :: i +-> k). Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) a b -> (Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) %% a) ~> b Source Github #

cotabulate :: forall (a :: k -> j1 -> Type) (b :: i +-> k). Ob a => ((Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) %% a) ~> b) -> Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) a b Source Github #

corepMap :: forall (a :: k -> j1 -> Type) (b :: k -> j1 -> Type). (a ~> b) -> (Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) %% a) ~> (Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) %% b) Source Github #

corepUniv :: forall (a :: k -> j1 -> Type). Ob a => Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) a (Star (Ran ('OP j2) :: (i +-> k) -> k -> j1 -> Type) %% a) Source Github #

Corepresentable (Star (Tambara w) :: (k -> j -> Type) -> (j +-> k) -> Type) Source Github #

Pastro t ⊣ Tambara t

Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

coindex :: forall (a :: j +-> k) (b :: j +-> k). Star (Tambara w) a b -> (Star (Tambara w) %% a) ~> b Source Github #

cotabulate :: forall (a :: j +-> k) (b :: j +-> k). Ob a => ((Star (Tambara w) %% a) ~> b) -> Star (Tambara w) a b Source Github #

corepMap :: forall (a :: j +-> k) (b :: j +-> k). (a ~> b) -> (Star (Tambara w) %% a) ~> (Star (Tambara w) %% b) Source Github #

corepUniv :: forall (a :: j +-> k). Ob a => Star (Tambara w) a (Star (Tambara w) %% a) Source Github #

Profunctor j2 => Corepresentable (Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) :: (k -> j1 -> Type) -> (j1 +-> i) -> Type) Source Github #

The right Kan lift is the right adjoint of the postcomposition functor.

Instance details

Defined in Proarrow.Profunctor.Instance.Rift

Methods

coindex :: forall (a :: k -> j1 -> Type) (b :: j1 +-> i). Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) a b -> (Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) %% a) ~> b Source Github #

cotabulate :: forall (a :: k -> j1 -> Type) (b :: j1 +-> i). Ob a => ((Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) %% a) ~> b) -> Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) a b Source Github #

corepMap :: forall (a :: k -> j1 -> Type) (b :: k -> j1 -> Type). (a ~> b) -> (Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) %% a) ~> (Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) %% b) Source Github #

corepUniv :: forall (a :: k -> j1 -> Type). Ob a => Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) a (Star (Rift ('OP j2) :: (j1 +-> i) -> k -> j1 -> Type) %% a) Source Github #

HasColimits j k => Corepresentable (LimitAdj j :: COREPK b k -> REPK a k -> Type) Source Github # 
Instance details

Defined in Proarrow.Adjunction

Methods

coindex :: forall (a0 :: COREPK b k) (b0 :: REPK a k). LimitAdj j a0 b0 -> ((LimitAdj j :: COREPK b k -> REPK a k -> Type) %% a0) ~> b0 Source Github #

cotabulate :: forall (a0 :: COREPK b k) (b0 :: REPK a k). Ob a0 => (((LimitAdj j :: COREPK b k -> REPK a k -> Type) %% a0) ~> b0) -> LimitAdj j a0 b0 Source Github #

corepMap :: forall (a0 :: COREPK b k) (b0 :: COREPK b k). (a0 ~> b0) -> ((LimitAdj j :: COREPK b k -> REPK a k -> Type) %% a0) ~> ((LimitAdj j :: COREPK b k -> REPK a k -> Type) %% b0) Source Github #

corepUniv :: forall (a0 :: COREPK b k). Ob a0 => LimitAdj j a0 ((LimitAdj j :: COREPK b k -> REPK a k -> Type) %% a0) Source Github #

(Corepresentable p, Corepresentable q) => Corepresentable (p :++: q :: COPRODUCT k1 k2 -> COPRODUCT j1 j2 -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Coproduct

Methods

coindex :: forall (a :: COPRODUCT k1 k2) (b :: COPRODUCT j1 j2). (p :++: q) a b -> ((p :++: q) %% a) ~> b Source Github #

cotabulate :: forall (a :: COPRODUCT k1 k2) (b :: COPRODUCT j1 j2). Ob a => (((p :++: q) %% a) ~> b) -> (p :++: q) a b Source Github #

corepMap :: forall (a :: COPRODUCT k1 k2) (b :: COPRODUCT k1 k2). (a ~> b) -> ((p :++: q) %% a) ~> ((p :++: q) %% b) Source Github #

corepUniv :: forall (a :: COPRODUCT k1 k2). Ob a => (p :++: q) a ((p :++: q) %% a) Source Github #

corepObj :: forall {k1} {k2} (p :: k1 +-> k2) (a :: k2). (Corepresentable p, Ob a) => Obj (p %% a) Source Github #

withObCorep :: forall {k1} {k2} (p :: k1 +-> k2) (a :: k2) r. (Corepresentable p, Ob a) => (Ob (p %% a) => r) -> r Source Github #

dimapCorep :: forall {j} {k} p (a :: k) (b :: j) (c :: k) (d :: j). Corepresentable p => (c ~> a) -> (b ~> d) -> p a b -> p c d Source Github #

cotabulated :: forall {k1} {k2} p (a :: k2) (a' :: k2) (b :: k1) (b' :: k1). (Corepresentable p, Ob a) => PIso ((p %% a) ~> b) ((p %% a') ~> b') (p a b) (p a' b') Source Github #

type RepresentableCopresheaf (f :: Copresheaf k) = Corepresentable f Source Github #

A representable copresheaf is a representable functor in the Haskell sense.

type Key (f :: Copresheaf k) = f %% '() Source Github #

tabulatedCopresheaf :: forall {k} f (a :: k) (a' :: k). (RepresentableCopresheaf f, Ob a) => PIso (Key f ~> a) (Key f ~> a') (f '() a) (f '() a') Source Github #

data Corep (f :: j +-> k) (a :: j) (b :: k) where Source Github #

Dual to Rep: the corepresentable profunctor of f, a value Corep f a b being an arrow f @ a ~> b.

Constructors

Corep 

Fields

  • :: forall {j} {k} (a :: j) (f :: j +-> k) (b :: k). Ob a
     
  • => { unCorep :: (f @ a) ~> b
     
  •    } -> Corep f a b
     

Instances

Instances details
(FunctorForRep f, Thin j, ThinProfunctor q) => ComposeThin 'ByLeft (Corep f :: k -> j -> Type) (q :: i +-> j) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

arrComp :: forall (a :: k) (c :: i). (Ob a, Ob c, HasArrowComp 'ByLeft (Corep f) q a c) => (Corep f :.: q) a c Source Github #

withArrComp :: forall (a :: k) (c :: i) r. (Corep f :.: q) a c -> ((HasArrowComp 'ByLeft (Corep f) q a c, Ob a, Ob c) => r) -> r Source Github #

(FunctorForRep f, Thin j, DecidableProfunctor q) => DecideComp 'ByLeft (Corep f :: k -> j -> Type) (q :: i +-> j) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

decideComp :: forall (a :: k) (c :: i). (Ob a, Ob c) => Decision (Corep f :.: q) a c (HoldsComp 'ByLeft (Corep f) q a c) Source Github #

toHoldsComp :: forall (a :: k) (c :: i) r. (Corep f :.: q) a c -> ((HoldsComp 'ByLeft (Corep f) q a c ~ 'TRU, Ob a, Ob c) => r) -> r Source Github #

(MonoidalAction act, Ob x) => ActFl (act :: (m, j) +-> j) (Rep (ActionAt act x) :: j -> j -> Type) (Corep (ActionAt act x) :: j -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Action

Methods

withActP :: forall (s :: j) (a :: j) (b :: j) (t :: j) r. Rep (ActionAt act x) s a -> Corep (ActionAt act x) b t -> (forall (x0 :: m). Ob x0 => (s ~> Act act x0 a) -> (Act act x0 b ~> t) -> r) -> r Source Github #

(FunctorForRep f, LocallyFinite j) => Finitary (Corep f :: k -> j -> Type) Source Github #

A corepresentable over finite hom-sets is finitary, numbered as the hom-set f '' a ~> b@. (It lives here and not with Corep: Proarrow.Profunctor.Corepresentable is below this module.)

Instance details

Defined in Proarrow.Category.Enriched.Finitary

Methods

size :: forall (a :: k) (b :: j). (Ob a, Ob b) => Natural Source Github #

toIndex :: forall (a :: k) (b :: j). (Ob a, Ob b) => Corep f a b -> Natural Source Github #

fromIndex :: forall (a :: k) (b :: j). (Ob a, Ob b) => Natural -> Corep f a b Source Github #

elements :: forall (a :: k) (b :: j). (Ob a, Ob b) => [Corep f a b] Source Github #

(FunctorForRep f, DecidableProfunctor (Hom j)) => DecidableProfunctor (Corep f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

decide :: forall (a :: k) (b :: j). (Ob a, Ob b) => Decision (Corep f) a b (Holds (Corep f) a b) Source Github #

toHolds :: forall (a :: k) (b :: j) r. Corep f a b -> ((Holds (Corep f) a b ~ 'TRU, Ob a, Ob b) => r) -> r Source Github #

(FunctorForRep f, Thin j) => ThinProfunctor (Corep f :: k -> j -> Type) Source Github #

Corep f a b holds in a thin category exactly when f a ≤ b.

Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

arr :: forall (a :: k) (b :: j). (Ob a, Ob b, HasArrow (Corep f) a b) => Corep f a b Source Github #

withArr :: forall (a :: k) (b :: j) r. Corep f a b -> ((HasArrow (Corep f) a b, Ob a, Ob b) => r) -> r Source Github #

MonoidalProfunctor (Corep Forget) Source Github #

Forget is also a colax monoidal functor

Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

one :: Corep Forget (Unit :: LINEAR) (Unit :: Type) Source Github #

(**) :: forall (x1 :: LINEAR) x2 (y1 :: LINEAR) y2. Corep Forget x1 x2 -> Corep Forget y1 y2 -> Corep Forget (x1 ** y1) (x2 ** y2) Source Github #

(Monoidal k, Comonoid r) => MonoidalProfunctor (Corep (Constant r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

one :: Corep (Constant r) (Unit :: k) (Unit :: k) Source Github #

(**) :: forall (x1 :: k) (x2 :: k) (y1 :: k) (y2 :: k). Corep (Constant r) x1 x2 -> Corep (Constant r) y1 y2 -> Corep (Constant r) (x1 ** y1) (x2 ** y2) Source Github #

FunctorForRep f => Profunctor (Corep f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> Corep f a b -> Corep f c d Source Github #

lmap :: forall (c :: k) (a :: k) (b :: j). (c ~> a) -> Corep f a b -> Corep f c b Source Github #

rmap :: forall (b :: j) (d :: j) (a :: k). (b ~> d) -> Corep f a b -> Corep f a d Source Github #

(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Corep f a b -> r Source Github #

FunctorForRep f => Corepresentable (Corep f :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

Methods

coindex :: forall (a :: k) (b :: j). Corep f a b -> (Corep f %% a) ~> b Source Github #

cotabulate :: forall (a :: k) (b :: j). Ob a => ((Corep f %% a) ~> b) -> Corep f a b Source Github #

corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (Corep f %% a) ~> (Corep f %% b) Source Github #

corepUniv :: forall (a :: k). Ob a => Corep f a (Corep f %% a) Source Github #

FunctorForRep f => HasLimits (Corep f :: a -> i -> Type) k Source Github # 
Instance details

Defined in Proarrow.Limit

Methods

limit :: forall (d :: i +-> k). Representable d => (Limit (Corep f) d :.: Corep f) :~> d Source Github #

limitUniv :: forall (d :: i +-> k) (p :: a +-> k). (Representable d, Profunctor p) => ((p :.: Corep f) :~> d) -> p :~> Limit (Corep f) d Source Github #

FunctorForRep f => Proadjunction (Rep f :: k -> j -> Type) (Corep f :: j -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Adjunction

Methods

unit :: forall (a :: j). Ob a => (Corep f :.: Rep f) a a Source Github #

counit :: (Rep f :.: Corep f) :~> ((~>) :: CAT k) Source Github #

(OplaxMonoidalRep m, Algebra m x, Comonoid x) => AlgLensFl (m :: k +-> k) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) x) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) x) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Action

Methods

withAlgP :: forall (s :: k) (a :: k) (b :: k) (t :: k) r. Rep (ActionAt (Tensor :: k -> (k, k) -> Type) x) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) x) b t -> (forall (x0 :: k). Ob x0 => ((m % x0) ~> x0) -> (s ~> (x0 ** a)) -> ((x0 ** b) ~> t) -> r) -> r Source Github #

(OplaxMonoidalRep l, Algebra l x, Monoid x, Comonoid x, SymMonoidal k, HasCoproducts k) => ClassifyFl (l :: k +-> k) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) x) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) x) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Action

(HasCoproducts k, Ob t) => AffineFoldFl (Corep (Coproduct t) :: k -> k -> Type) (Rep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.AffineFold

Methods

previewP :: forall (s :: k) (a :: k). Bicartesian k => Corep (Coproduct t) s a -> s ~> (a || (TerminalObject :: k)) Source Github #

Comonoid m => AffineFoldFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github #

The tensor-action witness pair Rep/Corep (ActionAt Tensor m) views (and previews) when the residual m is a Comonoid: discard it with the counit. (Its setter and traversal instances live in Proarrow.Optic.Setter and Proarrow.Optic.Traversal.)

Instance details

Defined in Proarrow.Optic.MonoidalLens

Methods

previewP :: forall (s :: k) (a :: k). Bicartesian k => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> s ~> (a || (TerminalObject :: k)) Source Github #

(CopyDiscard k, HasCoproducts k, Ob t) => AffineFoldFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.AffineFold

Methods

previewP :: forall (s :: k) (a :: k). Bicartesian k => Rep (Coproduct t) s a -> s ~> (a || (TerminalObject :: k)) Source Github #

(HasBinaryProducts k, Ob s) => AffineFoldFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.AffineFold

Methods

previewP :: forall (s0 :: k) (a :: k). Bicartesian k => Rep (Product s) s0 a -> s0 ~> (a || (TerminalObject :: k)) Source Github #

(FoldFl p1 q1, FoldFl p2 q2, Monoidal k) => FoldFl (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

foldMapP :: forall (m :: k) (s :: k) (a :: k). Monoid m => Beside p1 p2 s a -> (a ~> m) -> s ~> m Source Github #

(FoldFl p1 q1, FoldFl p2 q2, HasBinaryCoproducts k) => FoldFl (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

foldMapP :: forall (m :: k) (s :: k) (a :: k). Monoid m => BesideSum p1 p2 s a -> (a ~> m) -> s ~> m Source Github #

(HasCoproducts k, Ob t) => FoldFl (Corep (Coproduct t) :: k -> k -> Type) (Rep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Fold

Methods

foldMapP :: forall (m :: k) (s :: k) (a :: k). Monoid m => Corep (Coproduct t) s a -> (a ~> m) -> s ~> m Source Github #

Comonoid m => FoldFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github #

The tensor-action witness pair Rep/Corep (ActionAt Tensor m) with a comonoid residual m (legs s ~> m ** a, m ** b ~> t) is a (monoidal) traversal witness. It folds by discarding the residual with the counit, and distributes a StrongDistributiveProfunctor by its own strength act @Tensor, so neither product strength nor tensor = product is needed. Only m must be a Comonoid, so this works in LINEAR for the duplicable objects. It is also the monoidal-lens witness (Proarrow.Optic.MonoidalLens).

Instance details

Defined in Proarrow.Optic.Traversal

Methods

foldMapP :: forall (m0 :: k) (s :: k) (a :: k). Monoid m0 => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> (a ~> m0) -> s ~> m0 Source Github #

(CopyDiscard k, HasCoproducts k, Ob t) => FoldFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Fold

Methods

foldMapP :: forall (m :: k) (s :: k) (a :: k). Monoid m => Rep (Coproduct t) s a -> (a ~> m) -> s ~> m Source Github #

(HasBinaryProducts k, Ob s) => FoldFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Fold

Methods

foldMapP :: forall (m :: k) (s0 :: k) (a :: k). Monoid m => Rep (Product s) s0 a -> (a ~> m) -> s0 ~> m Source Github #

(HasCoproducts k, Ob t) => GetterFl (Corep (Coproduct t) :: k -> k -> Type) (Rep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Getter

Methods

getP :: forall (s :: k) (a :: k). Corep (Coproduct t) s a -> s ~> a Source Github #

Comonoid m => GetterFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.MonoidalLens

Methods

getP :: forall (s :: k) (a :: k). Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> s ~> a Source Github #

(HasBinaryProducts k, Ob s) => GetterFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Getter

Methods

getP :: forall (s0 :: k) (a :: k). Rep (Product s) s0 a -> s0 ~> a Source Github #

HasCofree ob => Representable (Corep (Forget ob) :: SUBCAT ob -> k -> Type) Source Github #

By creating the right adjoint to the forgetful functor, we obtain the forgetful-cofree adjunction.

Instance details

Defined in Proarrow.Profunctor.Cofree

Methods

index :: forall (a :: SUBCAT ob) (b :: k). Corep (Forget ob) a b -> a ~> (Corep (Forget ob) % b) Source Github #

tabulate :: forall (b :: k) (a :: SUBCAT ob). Ob b => (a ~> (Corep (Forget ob) % b)) -> Corep (Forget ob) a b Source Github #

repMap :: forall (a :: k) (b :: k). (a ~> b) -> (Corep (Forget ob) % a) ~> (Corep (Forget ob) % b) Source Github #

repUniv :: forall (a :: k). Ob a => Corep (Forget ob) (Corep (Forget ob) % a) a Source Github #

(HasBinaryProducts k, Ob a) => Promonad (Corep (Product a) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Limit.BinaryProduct

Methods

id :: forall (a0 :: k). Ob a0 => Corep (Product a) a0 a0 Source Github #

(.) :: forall (b :: k) (c :: k) (a0 :: k). Corep (Product a) b c -> Corep (Product a) a0 b -> Corep (Product a) a0 c Source Github #

Comonoid m => AffineTravFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github #

In a cartesian category the tensor is the product, so the comonoidal residual can be projected out and put back: affineSet and glassP carry that assumption in their own constraints (Bicartesian, CCC), which is why these instances exist while a LensFl one cannot (putP has only HasBinaryProducts).

Instance details

Defined in Proarrow.Optic.MonoidalLens

Methods

affineMatch :: forall (s :: k) (a :: k) (b :: k) (t :: k). Bicartesian k => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> s ~> (t || a) Source Github #

affineSet :: forall (s :: k) (a :: k) (b :: k) (t :: k). Bicartesian k => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> (s && b) ~> t Source Github #

(CopyDiscard k, HasCoproducts k, Ob t) => AffineTravFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.AffineTraversal

Methods

affineMatch :: forall (s :: k) (a :: k) (b :: k) (t0 :: k). Bicartesian k => Rep (Coproduct t) s a -> Corep (Coproduct t) b t0 -> s ~> (t0 || a) Source Github #

affineSet :: forall (s :: k) (a :: k) (b :: k) (t0 :: k). Bicartesian k => Rep (Coproduct t) s a -> Corep (Coproduct t) b t0 -> (s && b) ~> t0 Source Github #

(HasBinaryProducts k, Ob s) => AffineTravFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.AffineTraversal

Methods

affineMatch :: forall (s0 :: k) (a :: k) (b :: k) (t :: k). Bicartesian k => Rep (Product s) s0 a -> Corep (Product s) b t -> s0 ~> (t || a) Source Github #

affineSet :: forall (s0 :: k) (a :: k) (b :: k) (t :: k). Bicartesian k => Rep (Product s) s0 a -> Corep (Product s) b t -> (s0 && b) ~> t Source Github #

Comonoid m => GlassFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.MonoidalLens

Methods

glassP :: forall (s :: k) (a :: k) (b :: k) (t :: k). CCC k => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> (s && Mod s a b) ~> t Source Github #

(Closed k, Ob d) => GlassFl (Rep (Exp d) :: k -> k -> Type) (Corep (Exp d) :: k -> k -> Type) Source Github #

The exponential pair, a grate witness: the source is ignored, and the consumer is fed the selector \s -> h s d for each point d of the exponent.

Instance details

Defined in Proarrow.Optic.Glass

Methods

glassP :: forall (s :: k) (a :: k) (b :: k) (t :: k). CCC k => Rep (Exp d) s a -> Corep (Exp d) b t -> (s && Mod s a b) ~> t Source Github #

(HasBinaryProducts k, Ob c) => GlassFl (Rep (Product c) :: k -> k -> Type) (Corep (Product c) :: k -> k -> Type) Source Github #

The product pair, a lens witness: the selector is the lens's own get, applied to the source at hand; the residual is kept.

Instance details

Defined in Proarrow.Optic.Glass

Methods

glassP :: forall (s :: k) (a :: k) (b :: k) (t :: k). CCC k => Rep (Product c) s a -> Corep (Product c) b t -> (s && Mod s a b) ~> t Source Github #

(Closed k, SymMonoidal k, HasCoproducts k, CocommutativeComonoid m) => GrateFl (Rep (Exp m) :: k -> k -> Type) (Corep (Exp m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Grate

Methods

zipWithP :: forall (s :: k) (a :: k) (b :: k) (t :: k). (Closed k, SymMonoidal k) => Rep (Exp m) s a -> Corep (Exp m) b t -> forall (x :: k). Ob x => ((x ~~> a) ~> b) -> (x ~~> s) ~> t Source Github #

(SymMonoidal k, HasCoproducts k, Monoid m) => CotravFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github #

The tensor-action pair for a monoid residual: m ** - is the writer applicative.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

cotravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). Cotraversable r => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> r a b -> r s t Source Github #

(Closed k, SymMonoidal k, HasCoproducts k, CocommutativeComonoid m) => CotravFl (Rep (Exp m) :: k -> k -> Type) (Corep (Exp m) :: k -> k -> Type) Source Github #

The exponential pair for a comonoid exponent: m ~~> - is the reader applicative. So every Grate is a kaleidoscope.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

cotravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). Cotraversable r => Rep (Exp m) s a -> Corep (Exp m) b t -> r a b -> r s t Source Github #

(SymMonoidal k, HasCoproducts k, Monoid m) => KaleidoFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

kaleidoP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). Kaleidoscopic r => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> r a b -> r s t Source Github #

(Closed k, SymMonoidal k, HasCoproducts k, CocommutativeComonoid m) => KaleidoFl (Rep (Exp m) :: k -> k -> Type) (Corep (Exp m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

kaleidoP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). Kaleidoscopic r => Rep (Exp m) s a -> Corep (Exp m) b t -> r a b -> r s t Source Github #

(HasBinaryProducts k, Ob s) => LensFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Lens

Methods

putP :: forall (s0 :: k) (a :: k) (b :: k) (t :: k). HasBinaryProducts k => Rep (Product s) s0 a -> Corep (Product s) b t -> (s0 && b) ~> t Source Github #

Comonoid m => MonLensFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.MonoidalLens

Methods

withMonLensP :: forall (s :: k) (a :: k) (b :: k) (t :: k) r. SymMonoidal k => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> (forall (m0 :: k). Ob m0 => ComonoidOn m0 -> (s ~> (m0 ** a)) -> ((m0 ** b) ~> t) -> r) -> r Source Github #

(CopyDiscard k, HasCoproducts k, Ob t) => PrismFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Prism

Methods

matchingP :: forall (s :: k) (a :: k) (b :: k) (t0 :: k). HasBinaryCoproducts k => Rep (Coproduct t) s a -> Corep (Coproduct t) b t0 -> s ~> (t0 || a) Source Github #

(SetterFl p1 q1, SetterFl p2 q2, Monoidal k) => SetterFl (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

overP :: forall (s :: k) (a :: k) (b :: k) (t :: k). Beside p1 p2 s a -> CoBeside q1 q2 b t -> (a ~> b) -> s ~> t Source Github #

(SetterFl p1 q1, SetterFl p2 q2, HasBinaryCoproducts k) => SetterFl (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

overP :: forall (s :: k) (a :: k) (b :: k) (t :: k). BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> (a ~> b) -> s ~> t Source Github #

(TracedMonoidal k, Ob m) => SetterFl (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github #

The tracer witness: the tensor-action pair read the other way round, Corep (ActionAt Tensor m) on the left and Rep (ActionAt Tensor m) on the right. Its overP is the trace of m ** s ~> a ~> b ~> m ** t over m, so it needs the category to be TracedMonoidal.

Instance details

Defined in Proarrow.Optic.Tracer

Methods

overP :: forall (s :: k) (a :: k) (b :: k) (t :: k). Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> (a ~> b) -> s ~> t Source Github #

(Monoidal k, Ob a) => SetterFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) a) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) a) :: k -> k -> Type) Source Github #

The tensor-action witness pair Rep/Corep (ActionAt Tensor a): the focus x sits inside a ** x with the residual a carried on the left (legs s ~> a ** x and a ** x ~> t). It is a setter witness by mapping under the tensor, and the tensor-strength generator for the free traversal profunctor (see Proarrow.Optic.MonoidalTraversal); read the other way round it is the tracer witness (see Proarrow.Optic.Tracer).

Instance details

Defined in Proarrow.Optic.Setter

Methods

overP :: forall (s :: k) (a0 :: k) (b :: k) (t :: k). Rep (ActionAt (Tensor :: k -> (k, k) -> Type) a) s a0 -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) a) b t -> (a0 ~> b) -> s ~> t Source Github #

(Closed k, Ob m) => SetterFl (Rep (Exp m) :: k -> k -> Type) (Corep (Exp m) :: k -> k -> Type) Source Github #

The grate witness is a setter witness: map under the exponential. The Closed structure this needs rides in the instance context, not in overP's own (weaker) constraint.

Instance details

Defined in Proarrow.Optic.Setter

Methods

overP :: forall (s :: k) (a :: k) (b :: k) (t :: k). Rep (Exp m) s a -> Corep (Exp m) b t -> (a ~> b) -> s ~> t Source Github #

(HasCoproducts k, Ob t) => SetterFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Setter

Methods

overP :: forall (s :: k) (a :: k) (b :: k) (t0 :: k). Rep (Coproduct t) s a -> Corep (Coproduct t) b t0 -> (a ~> b) -> s ~> t0 Source Github #

(HasBinaryProducts k, Ob s) => SetterFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Setter

Methods

overP :: forall (s0 :: k) (a :: k) (b :: k) (t :: k). Rep (Product s) s0 a -> Corep (Product s) b t -> (a ~> b) -> s0 ~> t Source Github #

(TracedMonoidal k, Ob m) => TracerFl (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Tracer

Methods

withTracerP :: forall (s :: k) (a :: k) (b :: k) (t :: k) r. Monoidal k => Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> (forall (m0 :: k). Ob m0 => ((m0 ** s) ~> a) -> (b ~> (m0 ** t)) -> r) -> r Source Github #

(MonTravFl p1 q1, MonTravFl p2 q2, Monoidal k) => MonTravFl (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => Beside p1 p2 s a -> CoBeside q1 q2 b t -> r a b -> r s t Source Github #

(MonTravFl p1 q1, MonTravFl p2 q2, HasBinaryCoproducts k) => MonTravFl (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github #

Comonoid m => MonTravFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> r a b -> r s t Source Github #

(CopyDiscard k, HasCoproducts k, Ob t) => MonTravFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

monTravP :: forall r (s :: k) (a :: k) (b :: k) (t0 :: k). StrongDistributiveProfunctor r => Rep (Coproduct t) s a -> Corep (Coproduct t) b t0 -> r a b -> r s t0 Source Github #

(TravFl p1 q1, TravFl p2 q2, Monoidal k) => TravFl (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => Beside p1 p2 s a -> CoBeside q1 q2 b t -> r a b -> r s t Source Github #

(TravFl p1 q1, TravFl p2 q2, HasBinaryCoproducts k) => TravFl (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github #

Comonoid m => TravFl (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) s a -> Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m) b t -> r a b -> r s t Source Github #

(CopyDiscard k, HasCoproducts k, Ob t) => TravFl (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

travP :: forall r (s :: k) (a :: k) (b :: k) (t0 :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => Rep (Coproduct t) s a -> Corep (Coproduct t) b t0 -> r a b -> r s t0 Source Github #

(HasBinaryProducts k, Ob s) => TravFl (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

travP :: forall r (s0 :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => Rep (Product s) s0 a -> Corep (Product s) b t -> r a b -> r s0 t Source Github #

HasBinaryProducts k => Representable (Corep (Diag :: k +-> (k, k)) :: k -> (k, k) -> Type) Source Github #

The right adjoint to the diagonal functor.

Instance details

Defined in Proarrow.Limit.BinaryProduct

Methods

index :: forall (a :: k) (b :: (k, k)). Corep (Diag :: k +-> (k, k)) a b -> a ~> (Corep (Diag :: k +-> (k, k)) % b) Source Github #

tabulate :: forall (b :: (k, k)) (a :: k). Ob b => (a ~> (Corep (Diag :: k +-> (k, k)) % b)) -> Corep (Diag :: k +-> (k, k)) a b Source Github #

repMap :: forall (a :: (k, k)) (b :: (k, k)). (a ~> b) -> (Corep (Diag :: k +-> (k, k)) % a) ~> (Corep (Diag :: k +-> (k, k)) % b) Source Github #

repUniv :: forall (a :: (k, k)). Ob a => Corep (Diag :: k +-> (k, k)) (Corep (Diag :: k +-> (k, k)) % a) a Source Github #

type HasArrowComp 'ByLeft (Corep f :: k -> j -> Type) (q :: i +-> j) (a :: k) (c :: i) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

type HasArrowComp 'ByLeft (Corep f :: k -> j -> Type) (q :: i +-> j) (a :: k) (c :: i) = HasArrow q (f @ a) c
type HoldsComp 'ByLeft (Corep f :: k -> j -> Type) (q :: i +-> j) (a :: k) (c :: i) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

type HoldsComp 'ByLeft (Corep f :: k -> j -> Type) (q :: i +-> j) (a :: k) (c :: i) = Holds q (f @ a) c
type Limit (Corep f :: a -> i -> Type) (d :: i +-> k) Source Github # 
Instance details

Defined in Proarrow.Limit

type Limit (Corep f :: a -> i -> Type) (d :: i +-> k) = d :.: Rep f
type (Corep f :: k -> j -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

type (Corep f :: k -> j -> Type) %% (a :: k) = f @ a
type HasArrow (Corep f :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

type HasArrow (Corep f :: k -> j -> Type) (a :: k) (b :: j) = HasArrow (Hom j) (f @ a) b
type Holds (Corep f :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Corepresentable

type Holds (Corep f :: k -> j -> Type) (a :: k) (b :: j) = Holds (Hom j) (f @ a) b
type (Corep (Forget ob) :: SUBCAT ob -> k -> Type) % (a :: k) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Cofree

type (Corep (Forget ob) :: SUBCAT ob -> k -> Type) % (a :: k) = 'SUB (Cofree ob a) :: SUBCAT ob
type (Corep (Diag :: k +-> (k, k)) :: k -> (k, k) -> Type) % ('(a, b) :: (k, k)) Source Github # 
Instance details

Defined in Proarrow.Limit.BinaryProduct

type (Corep (Diag :: k +-> (k, k)) :: k -> (k, k) -> Type) % ('(a, b) :: (k, k)) = a && b

corep :: forall {j} {k} (f :: j +-> k) (a :: j) (b :: k) (a' :: j) (b' :: k). (FunctorForRep f, Ob a) => PIso ((f @ a) ~> b) ((f @ a') ~> b') (Corep f a b) (Corep f a' b') Source Github #