proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Profunctor.Representable

Description

Representable profunctors: profunctors of the shape functor followed by hom, identifying p a b with a ~> p % b. Since a functor between different kinds cannot be written directly as a Haskell data type, representable profunctors (with their functorial action %) are how this library encodes such functors; Rep packages any FunctorForRep as its representable profunctor.

Synopsis

Documentation

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

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

Minimal complete definition

index, (tabulate, repMap | repUniv)

Associated Types

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

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => p (p % a) a Source Github #

Instances

Instances details
Representable Booleans Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Associated Types

type Booleans % (x :: BOOL) 
Instance details

Defined in Proarrow.Profunctor.Representable

type Booleans % (x :: BOOL) = x

Methods

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

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

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

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

Functor m => Representable (Kleisli m :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

index :: Kleisli m a b -> a ~> (Kleisli m % b) Source Github #

tabulate :: Ob b => (a ~> (Kleisli m % b)) -> Kleisli m a b Source Github #

repMap :: (a ~> b) -> (Kleisli m % a) ~> (Kleisli m % b) Source Github #

repUniv :: Ob a => Kleisli m (Kleisli m % a) a Source Github #

ArrowApply arr => Representable (Arr arr :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

index :: Arr arr a b -> a ~> (Arr arr % b) Source Github #

tabulate :: Ob b => (a ~> (Arr arr % b)) -> Arr arr a b Source Github #

repMap :: (a ~> b) -> (Arr arr % a) ~> (Arr arr % b) Source Github #

repUniv :: Ob a => Arr arr (Arr arr % a) a Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

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

Representable (Cont r :: Type -> Type -> Type) Source Github #

At Type the continuation promonad is the continuation monad: (b -> r) -> (a -> r) is a -> (b -> r) -> r by flipping the arguments, so Cont r % b is the double-negation (b -> r) -> r. This gives KLEISLI (Cont r) its initial object and coproducts, which hold for the Kleisli category of a monad but not of an arbitrary promonad.

Instance details

Defined in Proarrow.Promonad.Cont

Methods

index :: Cont r a b -> a ~> (Cont r % b) Source Github #

tabulate :: Ob b => (a ~> (Cont r % b)) -> Cont r a b Source Github #

repMap :: (a ~> b) -> (Cont r % a) ~> (Cont r % b) Source Github #

repUniv :: Ob a => Cont r (Cont r % a) a Source Github #

Representable (->) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Associated Types

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

Defined in Proarrow.Profunctor.Representable

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

Methods

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

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

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

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

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

Defined in Proarrow.Limit.Terminal

Methods

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

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

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

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

(Monoidal k, SNatI n) => Representable (Pow n :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.PowerGrate

Methods

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

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

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

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

(Ob r, SymMonoidal k, Closed k) => Representable (Reader ('OP r) :: k -> k -> Type) Source Github #

The reader monad given the Promonad instance.

Instance details

Defined in Proarrow.Promonad.Reader

Methods

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

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

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

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

(Ob w, Monoidal k) => Representable (Writer w :: k -> k -> Type) Source Github #

The writer monad given the Promonad instance.

Instance details

Defined in Proarrow.Promonad.Writer

Methods

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

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

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

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

Representable (Costar ((,) a) :: Type -> Type -> Type) Source Github #

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

Instance details

Defined in Proarrow.Adjunction

Methods

index :: Costar ((,) a) a0 b -> a0 ~> (Costar ((,) a) % b) Source Github #

tabulate :: Ob b => (a0 ~> (Costar ((,) a) % b)) -> Costar ((,) a) a0 b Source Github #

repMap :: (a0 ~> b) -> (Costar ((,) a) % a0) ~> (Costar ((,) a) % b) Source Github #

repUniv :: Ob a0 => Costar ((,) a) (Costar ((,) a) % a0) a0 Source Github #

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

Defined in Proarrow.Profunctor.Instance.Adj

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => Adj p (Adj p % a) a Source Github #

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

Defined in Proarrow.Profunctor.Instance.Star

Methods

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

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

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (Star f % a) ~> (Star f % b) Source Github #

repUniv :: forall (a :: j). Ob a => Star f (Star f % a) a Source Github #

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

Defined in Proarrow.Profunctor.Instance.Wrapped

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => Wrapped p (Wrapped p % a) a Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => CorepStar p (CorepStar p % a) a Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (Rep f % a) ~> (Rep f % b) Source Github #

repUniv :: forall (a :: j). Ob a => Rep f (Rep f % a) a Source Github #

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

Defined in Proarrow.Promonad

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => AsRelative m (AsRelative m % a) a Source Github #

(forall (b :: j). Ob b => TermUniversal b l, Corepresentable l) => Representable (AsLeftAdjoint l :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Universal

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => AsLeftAdjoint l (AsLeftAdjoint l % a) a Source Github #

Representable r => Representable (AsRightAdjoint r :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Universal

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => AsRightAdjoint r (AsRightAdjoint r % a) a Source Github #

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

Defined in Proarrow.Universal

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => FromAdjunction p (FromAdjunction p % a) a Source Github #

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

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

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

Defined in Proarrow.Promonad.Reader

Methods

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

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

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

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

(Representable p, Ob s, SymMonoidal k, Closed k) => Representable (StateT s p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.State

Methods

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

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

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

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

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

Defined in Proarrow.Promonad.Writer

Methods

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

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

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

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

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

Defined in Proarrow.Limit.BinaryProduct

Methods

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

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

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

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

(HasLimits j2 k, Representable d) => Representable (Ran ('OP j2) d :: k -> j1 -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Ran

Methods

index :: forall (a :: k) (b :: j1). Ran ('OP j2) d a b -> a ~> (Ran ('OP j2) d % b) Source Github #

tabulate :: forall (b :: j1) (a :: k). Ob b => (a ~> (Ran ('OP j2) d % b)) -> Ran ('OP j2) d a b Source Github #

repMap :: forall (a :: j1) (b :: j1). (a ~> b) -> (Ran ('OP j2) d % a) ~> (Ran ('OP j2) d % b) Source Github #

repUniv :: forall (a :: j1). Ob a => Ran ('OP j2) d (Ran ('OP j2) d % a) a Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

repUniv :: forall (a :: j2). Ob a => (p :.: q) ((p :.: q) % a) 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 #

Monoidal k => Representable (Tensor :: k -> LIST k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Promonoidal

Methods

index :: forall (a :: k) (b :: LIST k). Tensor a b -> a ~> ((Tensor :: k -> LIST k -> Type) % b) Source Github #

tabulate :: forall (b :: LIST k) (a :: k). Ob b => (a ~> ((Tensor :: k -> LIST k -> Type) % b)) -> Tensor a b Source Github #

repMap :: forall (a :: LIST k) (b :: LIST k). (a ~> b) -> ((Tensor :: k -> LIST k -> Type) % a) ~> ((Tensor :: k -> LIST k -> Type) % b) Source Github #

repUniv :: forall (a :: LIST k). Ob a => Tensor ((Tensor :: k -> LIST k -> Type) % a) a Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

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

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

Defined in Proarrow.Colimit.BinaryCoproduct

Methods

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

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

repMap :: forall (a :: COPROD j) (b :: COPROD j). (a ~> b) -> (Coprod p % a) ~> (Coprod p % b) Source Github #

repUniv :: forall (a :: COPROD j). Ob a => Coprod p (Coprod p % a) a Source Github #

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

Defined in Proarrow.Limit.BinaryProduct

Methods

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

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

repMap :: forall (a :: PROD j) (b :: PROD j). (a ~> b) -> (Prod p % a) ~> (Prod p % b) Source Github #

repUniv :: forall (a :: PROD j). Ob a => Prod p (Prod p % a) a Source Github #

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

Defined in Proarrow.Profunctor.Instance.List

Methods

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

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

repMap :: forall (a :: LIST j) (b :: LIST j). (a ~> b) -> (List p % a) ~> (List p % b) Source Github #

repUniv :: forall (a :: LIST j). Ob a => List p (List p % a) a 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 #

(Representable p, forall (a :: k). ob a => ob (p % a)) => Representable (Sub p :: SUBCAT ob -> SUBCAT ob -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Sub

Methods

index :: forall (a :: SUBCAT ob) (b :: SUBCAT ob). Sub p a b -> a ~> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % b) Source Github #

tabulate :: forall (b :: SUBCAT ob) (a :: SUBCAT ob). Ob b => (a ~> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % b)) -> Sub p a b Source Github #

repMap :: forall (a :: SUBCAT ob) (b :: SUBCAT ob). (a ~> b) -> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % a) ~> ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % b) Source Github #

repUniv :: forall (a :: SUBCAT ob). Ob a => Sub p ((Sub p :: SUBCAT ob -> SUBCAT ob -> Type) % a) a Source Github #

HasLimits j k => Representable (LimitAdj j :: COREPK b k -> REPK a k -> Type) Source Github #

Colimit j ⊣ Limit j

Instance details

Defined in Proarrow.Adjunction

Methods

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

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

repMap :: forall (a0 :: REPK a k) (b0 :: REPK a 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 #

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

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

Defined in Proarrow.Category.Instance.Coproduct

Methods

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

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

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

repUniv :: forall (a :: COPRODUCT j1 j2). Ob a => (p :++: q) ((p :++: q) % a) a Source Github #

(Representable p, Representable q) => Representable (p :**: q :: (k1, k2) -> (j1, j2) -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

index :: forall (a :: (k1, k2)) (b :: (j1, j2)). (p :**: q) a b -> a ~> ((p :**: q) % b) Source Github #

tabulate :: forall (b :: (j1, j2)) (a :: (k1, k2)). Ob b => (a ~> ((p :**: q) % b)) -> (p :**: q) a b Source Github #

repMap :: forall (a :: (j1, j2)) (b :: (j1, j2)). (a ~> b) -> ((p :**: q) % a) ~> ((p :**: q) % b) Source Github #

repUniv :: forall (a :: (j1, j2)). Ob a => (p :**: q) ((p :**: q) % a) a Source Github #

repObj :: forall {j} {k} (p :: j +-> k) (a :: j). (Representable p, Ob a) => Obj (p % a) Source Github #

withObRep :: forall {j} {k} (p :: j +-> k) (a :: j) r. (Representable p, Ob a) => (Ob (p % a) => r) -> r Source Github #

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

tabulated :: forall {j} {k} p (a :: k) (a' :: k) (b :: j) (b' :: j). (Representable p, Ob b) => PIso (a ~> (p % b)) (a' ~> (p % b')) (p a b) (p a' b') Source Github #

type RepresentablePresheaf (f :: Presheaf k) = Representable f Source Github #

A representable presheaf is a contravariant representable functor in the Haskell sense.

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

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

data CorepStar (p :: k +-> j) (a :: k) (b :: j) where Source Github #

The corepresenting functor of p repackaged with the opposite variance: a value is an arrow a ~> p %% b, making CorepStar p Representable.

Constructors

CorepStar 

Fields

Instances

Instances details
(ThinProfunctor p, Corepresentable q, Thin j) => ComposeThin 'ByRight (p :: j +-> k) (CorepStar q :: j -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

arrComp :: forall (a :: k) (c :: i). (Ob a, Ob c, HasArrowComp 'ByRight p (CorepStar q) a c) => (p :.: CorepStar q) a c Source Github #

withArrComp :: forall (a :: k) (c :: i) r. (p :.: CorepStar q) a c -> ((HasArrowComp 'ByRight p (CorepStar q) a c, Ob a, Ob c) => r) -> r Source Github #

(DecidableProfunctor p, Corepresentable q, Thin j) => DecideComp 'ByRight (p :: j +-> k) (CorepStar q :: j -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

decideComp :: forall (a :: k) (c :: i). (Ob a, Ob c) => Decision (p :.: CorepStar q) a c (HoldsComp 'ByRight p (CorepStar q) a c) Source Github #

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

(Corepresentable g, Corepresentable f, Profunctor j, f ~ (g |> j)) => RelativeMonad (j :: k1 +-> i) (CorepStar g :.: CorepStar f :: k1 -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Ran

Methods

relReturn :: forall (a :: i). Ob a => j a ((CorepStar g :.: CorepStar f) % a) Source Github #

relBind :: forall (b :: i) (a :: i). Ob b => j a ((CorepStar g :.: CorepStar f) % b) -> ((CorepStar g :.: CorepStar f) % a) ~> ((CorepStar g :.: CorepStar f) % b) Source Github #

(Corepresentable p, DecidableProfunctor (Hom k)) => DecidableProfunctor (CorepStar p :: k -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

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

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

(Corepresentable p, Thin k) => ThinProfunctor (CorepStar p :: k -> j -> Type) Source Github #

CorepStar p a b holds in a thin category exactly when a ≤ p %% b.

Instance details

Defined in Proarrow.Profunctor.Representable

Methods

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

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

(Corepresentable p, Cocartesian j, Cocartesian k) => MonoidalProfunctor (CorepStar p :: j -> k -> Type) Source Github #

Every functor between cocartesian categories is lax monoidal, f a || f b ~> f (a || b) by the injections and InitialObject ~> f InitialObject by initiality. On the CorepStar of its corepresentable profunctor this is LaxMonoidal.

Instance details

Defined in Proarrow.Colimit.BinaryCoproduct

Methods

one :: CorepStar p (Unit :: j) (Unit :: k) Source Github #

(**) :: forall (x1 :: j) (x2 :: k) (y1 :: j) (y2 :: k). CorepStar p x1 x2 -> CorepStar p y1 y2 -> CorepStar p (x1 ** y1) (x2 ** y2) Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

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

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

repUniv :: forall (a :: j). Ob a => CorepStar p (CorepStar p % a) a Source Github #

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

Defined in Proarrow.Adjunction

Methods

unit :: forall (a :: j). Ob a => (p :.: CorepStar p) a a Source Github #

counit :: (CorepStar p :.: p) :~> ((~>) :: CAT k) Source Github #

(Bicartesian k, Cotraversable t, Corepresentable t) => FoldFl (CorepStar t :: k -> k -> Type) (t :: k +-> k) Source Github #

The corepresentable-cotraversable witness folds by cotraversing at the fold profunctor Rep (Constant m) and discarding the residual shape.

Instance details

Defined in Proarrow.Optic.Fold

Methods

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

Corepresentable t => SetterFl (CorepStar t :: k -> k -> Type) (t :: k +-> k) Source Github #

Dually, every corepresentable residual is a setter: map with corepMap. Needs only Corepresentable t, not Cotraversable.

Instance details

Defined in Proarrow.Optic.Setter

Methods

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

(Bicartesian k, Cotraversable t, Corepresentable t) => MonTravFl (CorepStar t :: k -> k -> Type) (t :: k +-> k) Source Github # 
Instance details

Defined in Proarrow.Optic.Traversal

Methods

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

(Bicartesian k, Cotraversable t, Corepresentable t) => TravFl (CorepStar t :: k -> k -> Type) (t :: k +-> k) Source Github #

A corepresentable Cotraversable functor builds s from a shape of a's, and its travP distributes an SDP the same way a cotraversal's would. So at this witness a cotraversal is a traversal, and it needs no flavor of its own. (Proarrow.Optic.Kaleidoscope does define a Cotraversal, over Cotraversable witnesses that are not representable. In the lattice it is a sibling of Traversal, not a descendant: both are children of Setter, and Cotraversal's own child is Kaleidoscope.)

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) => CorepStar t s a -> t b t0 -> r a b -> r s t0 Source Github #

type HasArrowComp 'ByRight (p :: j +-> k) (CorepStar q :: j -> i -> Type) (a :: k) (c :: i) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

type HasArrowComp 'ByRight (p :: j +-> k) (CorepStar q :: j -> i -> Type) (a :: k) (c :: i) = HasArrow p a (q %% c)
type HoldsComp 'ByRight (p :: j +-> k) (CorepStar q :: j -> i -> Type) (a :: k) (c :: i) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

type HoldsComp 'ByRight (p :: j +-> k) (CorepStar q :: j -> i -> Type) (a :: k) (c :: i) = Holds p a (q %% c)
type (CorepStar p :: k -> j -> Type) % (a :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

type (CorepStar p :: k -> j -> Type) % (a :: j) = p %% a
type HasArrow (CorepStar p :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

type HasArrow (CorepStar p :: k -> j -> Type) (a :: k) (b :: j) = HasArrow (Hom k) a (p %% b)
type Holds (CorepStar p :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

type Holds (CorepStar p :: k -> j -> Type) (a :: k) (b :: j) = Holds (Hom k) a (p %% b)

mapCorepStar :: forall {k} {j} (p :: k +-> j) (q :: k +-> j). (Corepresentable p, Corepresentable q) => (p ~> q) -> CorepStar q ~> CorepStar p Source Github #

data RepCostar (p :: k +-> j) (a :: k) (b :: j) where Source Github #

The representing functor of p repackaged with the opposite variance: a value is an arrow p % a ~> b, making RepCostar p Corepresentable.

Constructors

RepCostar 

Fields

Instances

Instances details
(Representable p, Thin j, ThinProfunctor q) => ComposeThin 'ByLeft (RepCostar p :: k -> j -> Type) (q :: i +-> j) Source Github #

A corepresented left leg forces the middle object down to p % a.

Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

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

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

(Representable p, Thin j, DecidableProfunctor q) => DecideComp 'ByLeft (RepCostar p :: 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 (RepCostar p :.: q) a c (HoldsComp 'ByLeft (RepCostar p) q a c) Source Github #

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

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

Defined in Proarrow.Adjunction

Methods

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

counit :: (p :.: RepCostar p) :~> ((~>) :: CAT j) Source Github #

(Bicartesian k, Traversable t, Representable t) => FoldFl (t :: k +-> k) (RepCostar t :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Fold

Methods

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

(Representable g, Representable f, Profunctor j, f ~ (j <| g)) => RelativeComonad (j :: k2 +-> i) (RepCostar f :.: RepCostar g :: k2 -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Rift

Methods

relExtract :: forall (a :: k2). Ob a => j ((RepCostar f :.: RepCostar g) %% a) a Source Github #

relExtend :: forall (a :: k2) (b :: k2). Ob a => j ((RepCostar f :.: RepCostar g) %% a) b -> ((RepCostar f :.: RepCostar g) %% a) ~> ((RepCostar f :.: RepCostar g) %% b) Source Github #

(Traversable t, Representable t) => Prostrong (CotravFl :: (j +-> j) -> (j +-> j) -> Constraint) (RepCostar t :: j -> j -> Type) Source Github #

The carriers as instances, so that an optic of these flavors composed with another flavor that also runs at the carrier can be eliminated there directly.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

proact :: forall (f :: j +-> j) (g :: j +-> j). (CotravFl f g, Profunctor f, Profunctor g) => ((f :.: RepCostar t) :.: g) :~> RepCostar t Source Github #

(Traversable t, Representable t) => Prostrong (KaleidoFl :: (j +-> j) -> (j +-> j) -> Constraint) (RepCostar t :: j -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

proact :: forall (f :: j +-> j) (g :: j +-> j). (KaleidoFl f g, Profunctor f, Profunctor g) => ((f :.: RepCostar t) :.: g) :~> RepCostar t Source Github #

OplaxMonoidalRep m => Prostrong (AlgLensFl m :: (k +-> k) -> (k +-> k) -> Constraint) (RepCostar m :: k -> k -> Type) Source Github #

The carrier of the literature's algebraic-lens eliminator: RepCostar m, i.e. m % a ~> b. Absorbing an algebraic-lens witness pair collapses the residuals of the incoming computation through their algebra and hands the foci on as one m-computation.

Instance details

Defined in Proarrow.Optic.Action

Methods

proact :: forall (f :: k +-> k) (g :: k +-> k). (AlgLensFl m f g, Profunctor f, Profunctor g) => ((f :.: RepCostar m) :.: g) :~> RepCostar m Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

(Representable p, Cartesian j, Cartesian k) => MonoidalProfunctor (RepCostar p :: j -> k -> Type) Source Github #

Every functor between cartesian categories is oplax monoidal, f (a && b) ~> f a && f b by the projections and f Unit ~> Unit by terminality. On the RepCostar of its representable profunctor this is OplaxMonoidal.

Instance details

Defined in Proarrow.Category.Monoidal.Cartesian

Methods

one :: RepCostar p (Unit :: j) (Unit :: k) Source Github #

(**) :: forall (x1 :: j) (x2 :: k) (y1 :: j) (y2 :: k). RepCostar p x1 x2 -> RepCostar p y1 y2 -> RepCostar p (x1 ** y1) (x2 ** y2) Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

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

(Representable p, StrongDistributiveProfunctor p) => CotravFl (p :: k +-> k) (RepCostar p :: k -> k -> Type) Source Github #

The generating witnesses: any representable StrongDistributiveProfunctor (any applicative functor) with its RepCostar. The legs are s ~> p % a and p % b ~> t.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

cotravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). Cotraversable r => p s a -> RepCostar p b t -> r a b -> r s t Source Github #

(Representable p, StrongDistributiveProfunctor p) => KaleidoFl (p :: k +-> k) (RepCostar p :: 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 => p s a -> RepCostar p b t -> r a b -> r s t Source Github #

Representable t => SetterFl (t :: k +-> k) (RepCostar t :: k -> k -> Type) Source Github #

Every representable residual is a setter: map the focus through the residual functor with repMap. This needs only Representable t, not Traversable, which is why Setter sits at the top of the lattice: functoriality of the residual is all over ever uses. Richer optics (Lens, Traversal, ...) are this witness plus extra algebra on t.

Instance details

Defined in Proarrow.Optic.Setter

Methods

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

(Bicartesian k, Traversable t, Representable t) => MonTravFl (t :: k +-> k) (RepCostar 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 => t s a -> RepCostar t b t0 -> r a b -> r s t0 Source Github #

(Bicartesian k, Traversable t, Representable t) => TravFl (t :: k +-> k) (RepCostar 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) => t s a -> RepCostar t b t0 -> r a b -> r s t0 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 #

(Traversable t, Representable t) => Cotraversable (RepCostar t :: k -> k -> Type) Source Github #

This breaks for possibly infinite traversals like Star [].

Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p :: k +-> k). StrongDistributiveProfunctor p => (p :.: RepCostar t) :~> (RepCostar t :.: p) Source Github #

(FunctorForRep f, Promonad (Corep f)) => Promonad (RepCostar (Rep f) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

id :: forall (a :: k). Ob a => RepCostar (Rep f) a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). RepCostar (Rep f) b c -> RepCostar (Rep f) a b -> RepCostar (Rep f) a c Source Github #

(Traversable t, Representable t) => Kaleidoscopic (RepCostar t :: k -> k -> Type) Source Github #

The general carrier: the RepCostar of a traversable representable functor.

Instance details

Defined in Proarrow.Optic.Kaleidoscope

Methods

kaleidoAct :: forall (p :: k +-> k) (a :: k) (b :: k). (Representable p, StrongDistributiveProfunctor p) => RepCostar t a b -> RepCostar t (p % a) (p % b) Source Github #

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

Defined in Proarrow.Category.Enriched.Thin.Composition

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

Defined in Proarrow.Category.Enriched.Thin.Composition

type HoldsComp 'ByLeft (RepCostar p :: k -> j -> Type) (q :: i +-> j) (a :: k) (c :: i) = Holds q (p % a) c
type (RepCostar p :: k -> j -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

type (RepCostar p :: k -> j -> Type) %% (a :: k) = p % a
type HasArrow (RepCostar p :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

type HasArrow (RepCostar p :: k -> j -> Type) (a :: k) (b :: j) = HasArrow (Hom j) (p % a) b
type Holds (RepCostar p :: k -> j -> Type) (a :: k) (b :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

type Holds (RepCostar p :: k -> j -> Type) (a :: k) (b :: j) = Holds (Hom j) (p % a) b

mapRepCostar :: forall {k} {j} (p :: k +-> j) (q :: k +-> j). (Representable p, Representable q) => (p ~> q) -> RepCostar q ~> RepCostar p Source Github #

flipRep :: forall {k1} (p :: k1 +-> k1). Representable p => (((~>) :: CAT k1) :~> p) -> RepCostar p :~> ((~>) :: CAT k1) Source Github #

unflipRep :: forall {k1} (p :: k1 +-> k1). Representable p => (RepCostar p :~> ((~>) :: CAT k1)) -> ((~>) :: CAT k1) :~> p Source Github #

flipCorep :: forall {k1} (p :: k1 +-> k1). Corepresentable p => (((~>) :: CAT k1) :~> p) -> CorepStar p :~> ((~>) :: CAT k1) Source Github #

unflipCorep :: forall {k1} (p :: k1 +-> k1). Corepresentable p => (CorepStar p :~> ((~>) :: CAT k1)) -> ((~>) :: CAT k1) :~> p Source Github #

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

The representable profunctor of a functor-for-representation f (FunctorForRep): a value Rep f a b is an arrow a ~> f @ b. This is the profunctor encoding of functors used throughout the library.

Constructors

Rep 

Fields

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

Instances

Instances details
(ThinProfunctor p, FunctorForRep g, Thin j) => ComposeThin 'ByRight (p :: j +-> k) (Rep g :: j -> i -> Type) Source Github #

A represented right leg forces the middle object up to g c@.

Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

arrComp :: forall (a :: k) (c :: i). (Ob a, Ob c, HasArrowComp 'ByRight p (Rep g) a c) => (p :.: Rep g) a c Source Github #

withArrComp :: forall (a :: k) (c :: i) r. (p :.: Rep g) a c -> ((HasArrowComp 'ByRight p (Rep g) a c, Ob a, Ob c) => r) -> r Source Github #

(DecidableProfunctor p, FunctorForRep g, Thin j) => DecideComp 'ByRight (p :: j +-> k) (Rep g :: j -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

Methods

decideComp :: forall (a :: k) (c :: i). (Ob a, Ob c) => Decision (p :.: Rep g) a c (HoldsComp 'ByRight p (Rep g) a c) Source Github #

toHoldsComp :: forall (a :: k) (c :: i) r. (p :.: Rep g) a c -> ((HoldsComp 'ByRight p (Rep g) 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 #

Monoidal k => MonoidalAction (Tensor :: k -> (k, k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

unitor :: forall (x :: k). Ob x => Act (Tensor :: k -> (k, k) -> Type) (Unit :: k) x ~> x Source Github #

unitorInv :: forall (x :: k). Ob x => x ~> Act (Tensor :: k -> (k, k) -> Type) (Unit :: k) x Source Github #

multiplicator :: forall (a :: k) (b :: k) (x :: k). (Ob a, Ob b, Ob x) => Act (Tensor :: k -> (k, k) -> Type) (a ** b) x ~> Act (Tensor :: k -> (k, k) -> Type) a (Act (Tensor :: k -> (k, k) -> Type) b x) Source Github #

multiplicatorInv :: forall (a :: k) (b :: k) (x :: k). (Ob a, Ob b, Ob x) => Act (Tensor :: k -> (k, k) -> Type) a (Act (Tensor :: k -> (k, k) -> Type) b x) ~> Act (Tensor :: k -> (k, k) -> Type) (a ** b) x Source Github #

Costrong (Tensor :: DOT -> (DOT, DOT) -> Type) Dot Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

coact :: forall (a :: DOT) (x :: DOT) (y :: DOT). (Ob a, Ob x, Ob y) => Dot (Act (Tensor :: DOT -> (DOT, DOT) -> Type) a x) (Act (Tensor :: DOT -> (DOT, DOT) -> Type) a y) -> Dot x y Source Github #

Costrong (Tensor :: SVG -> (SVG, SVG) -> Type) Svg Source Github #

The traced wires loop round the side of the diagram they are nearest to.

Instance details

Defined in Proarrow.Tools.Diagrams.Svg

Methods

coact :: forall (a :: SVG) (x :: SVG) (y :: SVG). (Ob a, Ob x, Ob y) => Svg (Act (Tensor :: SVG -> (SVG, SVG) -> Type) a x) (Act (Tensor :: SVG -> (SVG, SVG) -> Type) a y) -> Svg x y Source Github #

MonadFix m => Costrong (Tensor :: Type -> (Type, Type) -> Type) (Kleisli m :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

coact :: (Ob a, Ob x, Ob y) => Kleisli m (Act (Tensor :: Type -> (Type, Type) -> Type) a x) (Act (Tensor :: Type -> (Type, Type) -> Type) a y) -> Kleisli m x y Source Github #

ArrowLoop arr => Costrong (Tensor :: Type -> (Type, Type) -> Type) (Arr arr :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

coact :: (Ob a, Ob x, Ob y) => Arr arr (Act (Tensor :: Type -> (Type, Type) -> Type) a x) (Act (Tensor :: Type -> (Type, Type) -> Type) a y) -> Arr arr x y Source Github #

Monad m => Strong (Tensor :: Type -> (Type, Type) -> Type) (Kleisli m :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

act :: Ob a => Kleisli m x y -> Kleisli m (Act (Tensor :: Type -> (Type, Type) -> Type) a x) (Act (Tensor :: Type -> (Type, Type) -> Type) a y) Source Github #

Arrow arr => Strong (Tensor :: Type -> (Type, Type) -> Type) (Arr arr :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

act :: Ob a => Arr arr x y -> Arr arr (Act (Tensor :: Type -> (Type, Type) -> Type) a x) (Act (Tensor :: Type -> (Type, Type) -> Type) a y) Source Github #

Costrong (Tensor :: Type -> (Type, Type) -> Type) (->) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

coact :: (Ob a, Ob x, Ob y) => (Act (Tensor :: Type -> (Type, Type) -> Type) a x -> Act (Tensor :: Type -> (Type, Type) -> Type) a y) -> x -> y Source Github #

Strong (Tensor :: Type -> (Type, Type) -> Type) (Cont r :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Cont

Methods

act :: Ob a => Cont r x y -> Cont r (Act (Tensor :: Type -> (Type, Type) -> Type) a x) (Act (Tensor :: Type -> (Type, Type) -> Type) a y) Source Github #

(CopyDiscard k, SNatI n) => Strong (Tensor :: k -> (k, k) -> Type) (Pow n :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.PowerGrate

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => Pow n x y -> Pow n (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(Ob r, SymMonoidal k) => Strong (Tensor :: k -> (k, k) -> Type) (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => Reader ('OP r) x y -> Reader ('OP r) (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(Ob w, SymMonoidal k) => Strong (Tensor :: k -> (k, k) -> Type) (Writer w :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => Writer w x y -> Writer w (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

Functor f => Strong (Tensor :: Type -> (Type, Type) -> Type) (Star f :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

Methods

act :: Ob a => Star f x y -> Star f (Act (Tensor :: Type -> (Type, Type) -> Type) a x) (Act (Tensor :: Type -> (Type, Type) -> Type) a y) Source Github #

(SymMonoidal k, Ob m) => Strong (Tensor :: k -> (k, k) -> Type) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) x y -> Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(Closed k, SymMonoidal k, Ob m) => Strong (Tensor :: k -> (k, k) -> Type) (Rep (Exp m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => Rep (Exp m) x y -> Rep (Exp m) (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(CopyDiscard k, Ob r) => Strong (Tensor :: k -> (k, k) -> Type) (Rep (Constant r) :: k -> k -> Type) Source Github #

The constant functor ignores the acting object: discard it. Only copying/discarding is needed, so this works in biproduct categories as well as cartesian ones.

Instance details

Defined in Proarrow.Category.Monoidal.CopyDiscard

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => Rep (Constant r) x y -> Rep (Constant r) (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

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

Defined in Proarrow.Promonad.Reader

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => ReaderT ('OP r) p x y -> ReaderT ('OP r) p (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(Strong (Tensor :: k -> (k, k) -> Type) p, Ob s, SymMonoidal k) => Strong (Tensor :: k -> (k, k) -> Type) (StateT s p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.State

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => StateT s p x y -> StateT s p (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(Strong (Tensor :: k -> (k, k) -> Type) p, Ob w, SymMonoidal k) => Strong (Tensor :: k -> (k, k) -> Type) (WriterT w p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

Methods

act :: forall (a :: k) (x :: k) (y :: k). Ob a => WriterT w p x y -> WriterT w p (Act (Tensor :: k -> (k, k) -> Type) a x) (Act (Tensor :: k -> (k, k) -> Type) a y) Source Github #

(Monoidal k, Ob a, Ob b, Flavor w, forall (m :: k). Ob m => w (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) m)) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m))) => Costrong (Tensor :: k -> (k, k) -> Type) (ExOptic w a b :: k -> k -> Type) Source Github #

The generic carrier absorbs the residual of a Costrong action whenever the flavor contains the tracer generator: one more tensor-action layer, composed onto the witnesses. With it, profunctor-class-flavored tracers (PTracer) eliminate through ExOptic too.

Instance details

Defined in Proarrow.Optic.Tracer

Methods

coact :: forall (a0 :: k) (x :: k) (y :: k). (Ob a0, Ob x, Ob y) => ExOptic w a b (Act (Tensor :: k -> (k, k) -> Type) a0 x) (Act (Tensor :: k -> (k, k) -> Type) a0 y) -> ExOptic w a b x y Source Github #

(Monoidal k, Ob a, Ob b, Flavor w, forall (x :: k). Ob x => w (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) x)) (Corep (ActionAt (Tensor :: k -> (k, k) -> Type) x))) => Strong (Tensor :: k -> (k, k) -> Type) (ExOptic w a b :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.MonoidalTraversal

Methods

act :: forall (a0 :: k) (x :: k) (y :: k). Ob a0 => ExOptic w a b x y -> ExOptic w a b (Act (Tensor :: k -> (k, k) -> Type) a0 x) (Act (Tensor :: k -> (k, k) -> Type) a0 y) Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

MonoidalProfunctor (Rep Fun) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

Methods

one :: Rep Fun (Unit :: FINREL) (Unit :: FINSET) Source Github #

(**) :: forall (x1 :: FINREL) (x2 :: FINSET) (y1 :: FINREL) (y2 :: FINSET). Rep Fun x1 x2 -> Rep Fun y1 y2 -> Rep Fun (x1 ** y1) (x2 ** y2) Source Github #

MonoidalProfunctor (Rep Forget) Source Github #

Forget is a lax monoidal functor

Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

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

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

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

Tensoring with a monoid, m ** -, is an applicative functor: the monoid's unit is pure and its multiplication is *. Rendered on the representable profunctor Rep (ActionAt Tensor m) (legs a ~> m ** b) this is a StrongDistributiveProfunctor, the Writer applicative of the literature. (The Constant instances above are the degenerate case b = Unit.)

Instance details

Defined in Proarrow.Monoid

Methods

one :: Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) (Unit :: k) (Unit :: k) Source Github #

(**) :: forall (x1 :: k) (x2 :: k) (y1 :: k) (y2 :: k). Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) x1 x2 -> Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) y1 y2 -> Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) (x1 ** y1) (x2 ** y2) Source Github #

(Closed k, SymMonoidal k, Comonoid m) => MonoidalProfunctor (Rep (Exp m) :: k -> k -> Type) Source Github #

The exponential by a comonoid, m ~~> -, is an applicative functor (the reader applicative): pure discards the argument with the counit and * duplicates it with the comultiplication. Rendered on Rep (Exp m) (legs a ~> (m ~~> b)) this is a StrongDistributiveProfunctor, so a Grate is a Kaleidoscope.

Instance details

Defined in Proarrow.Monoid

Methods

one :: Rep (Exp m) (Unit :: k) (Unit :: k) Source Github #

(**) :: forall (x1 :: k) (x2 :: k) (y1 :: k) (y2 :: k). Rep (Exp m) x1 x2 -> Rep (Exp m) y1 y2 -> Rep (Exp m) (x1 ** y1) (x2 ** y2) Source Github #

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

Defined in Proarrow.Monoid

Methods

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

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

CategoryOf k => MonoidalAction (Rep (NoAction :: ((), k) +-> k) :: k -> ((), k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

unitor :: forall (x :: k). Ob x => Act (Rep (NoAction :: ((), k) +-> k)) (Unit :: ()) x ~> x Source Github #

unitorInv :: forall (x :: k). Ob x => x ~> Act (Rep (NoAction :: ((), k) +-> k)) (Unit :: ()) x Source Github #

multiplicator :: forall (a :: ()) (b :: ()) (x :: k). (Ob a, Ob b, Ob x) => Act (Rep (NoAction :: ((), k) +-> k)) (a ** b) x ~> Act (Rep (NoAction :: ((), k) +-> k)) a (Act (Rep (NoAction :: ((), k) +-> k)) b x) Source Github #

multiplicatorInv :: forall (a :: ()) (b :: ()) (x :: k). (Ob a, Ob b, Ob x) => Act (Rep (NoAction :: ((), k) +-> k)) a (Act (Rep (NoAction :: ((), k) +-> k)) b x) ~> Act (Rep (NoAction :: ((), k) +-> k)) (a ** b) x Source Github #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

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

(\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Rep f a b -> r 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 #

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

Defined in Proarrow.Profunctor.Representable

Methods

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

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

repMap :: forall (a :: j) (b :: j). (a ~> b) -> (Rep f % a) ~> (Rep f % b) Source Github #

repUniv :: forall (a :: j). Ob a => Rep f (Rep f % a) a Source Github #

ProLaws (Costrong (Tensor :: j -> (j, j) -> Type) :: (j +-> j) -> Constraint) Source Github #

The laws of costrength for the tensor acting on its own category: coact is natural in the element and dinatural in the acting object (sliding), and coacting by the Unit or by a tensor is doing nothing or coacting twice (vanishing). An element with tensored endpoints is made from the drawn element p with arbitrary arrows into and out of it.

Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

proLaws :: [ProLaw (Costrong (Tensor :: j -> (j, j) -> Type))] Source Github #

ProLaws (Strong (Tensor :: j -> (j, j) -> Type) :: (j +-> j) -> Constraint) Source Github #

The laws of strength for the tensor acting on its own category: acting by the Unit does nothing and acting by a tensor is acting twice, up to the unitor and the associator, and act is natural in the element and dinatural in the acting object.

Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

proLaws :: [ProLaw (Strong (Tensor :: j -> (j, j) -> Type))] Source Github #

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

Defined in Proarrow.Colimit

Methods

colimit :: forall (d :: k +-> i). Corepresentable d => (Rep f :.: Colimit (Rep f) d) :~> d Source Github #

colimitUniv :: forall (d :: k +-> i) (p :: k +-> a). (Corepresentable d, Profunctor p) => ((Rep f :.: p) :~> d) -> p :~> Colimit (Rep 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 #

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 #

(FunctorForRep f, Promonad (Corep f)) => Promonad (RepCostar (Rep f) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

Methods

id :: forall (a :: k). Ob a => RepCostar (Rep f) a a Source Github #

(.) :: forall (b :: k) (c :: k) (a :: k). RepCostar (Rep f) b c -> RepCostar (Rep f) a b -> RepCostar (Rep f) a 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, Comonoid 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, Comonoid 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, Comonoid 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 #

CategoryOf k => MonoidalAction (RepAction :: k -> (RepSub k, k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.EndoProf

Methods

unitor :: forall (x :: k). Ob x => Act (RepAction :: k -> (RepSub k, k) -> Type) (Unit :: RepSub k) x ~> x Source Github #

unitorInv :: forall (x :: k). Ob x => x ~> Act (RepAction :: k -> (RepSub k, k) -> Type) (Unit :: RepSub k) x Source Github #

multiplicator :: forall (a :: RepSub k) (b :: RepSub k) (x :: k). (Ob a, Ob b, Ob x) => Act (RepAction :: k -> (RepSub k, k) -> Type) (a ** b) x ~> Act (RepAction :: k -> (RepSub k, k) -> Type) a (Act (RepAction :: k -> (RepSub k, k) -> Type) b x) Source Github #

multiplicatorInv :: forall (a :: RepSub k) (b :: RepSub k) (x :: k). (Ob a, Ob b, Ob x) => Act (RepAction :: k -> (RepSub k, k) -> Type) a (Act (RepAction :: k -> (RepSub k, k) -> Type) b x) ~> Act (RepAction :: k -> (RepSub k, k) -> Type) (a ** b) x Source Github #

CategoryOf k => MonoidalAction (TravAction :: k -> (TravSub k, k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.EndoProf

Methods

unitor :: forall (x :: k). Ob x => Act (TravAction :: k -> (TravSub k, k) -> Type) (Unit :: TravSub k) x ~> x Source Github #

unitorInv :: forall (x :: k). Ob x => x ~> Act (TravAction :: k -> (TravSub k, k) -> Type) (Unit :: TravSub k) x Source Github #

multiplicator :: forall (a :: TravSub k) (b :: TravSub k) (x :: k). (Ob a, Ob b, Ob x) => Act (TravAction :: k -> (TravSub k, k) -> Type) (a ** b) x ~> Act (TravAction :: k -> (TravSub k, k) -> Type) a (Act (TravAction :: k -> (TravSub k, k) -> Type) b x) Source Github #

multiplicatorInv :: forall (a :: TravSub k) (b :: TravSub k) (x :: k). (Ob a, Ob b, Ob x) => Act (TravAction :: k -> (TravSub k, k) -> Type) a (Act (TravAction :: k -> (TravSub k, k) -> Type) b x) ~> Act (TravAction :: k -> (TravSub k, k) -> Type) (a ** b) x Source Github #

HasCoproducts k => MonoidalAction (CoprodAction :: k -> (COPROD k, k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

unitor :: forall (x :: k). Ob x => Act (CoprodAction :: k -> (COPROD k, k) -> Type) (Unit :: COPROD k) x ~> x Source Github #

unitorInv :: forall (x :: k). Ob x => x ~> Act (CoprodAction :: k -> (COPROD k, k) -> Type) (Unit :: COPROD k) x Source Github #

multiplicator :: forall (a :: COPROD k) (b :: COPROD k) (x :: k). (Ob a, Ob b, Ob x) => Act (CoprodAction :: k -> (COPROD k, k) -> Type) (a ** b) x ~> Act (CoprodAction :: k -> (COPROD k, k) -> Type) a (Act (CoprodAction :: k -> (COPROD k, k) -> Type) b x) Source Github #

multiplicatorInv :: forall (a :: COPROD k) (b :: COPROD k) (x :: k). (Ob a, Ob b, Ob x) => Act (CoprodAction :: k -> (COPROD k, k) -> Type) a (Act (CoprodAction :: k -> (COPROD k, k) -> Type) b x) ~> Act (CoprodAction :: k -> (COPROD k, k) -> Type) (a ** b) x Source Github #

HasProducts k => MonoidalAction (ProdAction :: k -> (PROD k, k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

unitor :: forall (x :: k). Ob x => Act (ProdAction :: k -> (PROD k, k) -> Type) (Unit :: PROD k) x ~> x Source Github #

unitorInv :: forall (x :: k). Ob x => x ~> Act (ProdAction :: k -> (PROD k, k) -> Type) (Unit :: PROD k) x Source Github #

multiplicator :: forall (a :: PROD k) (b :: PROD k) (x :: k). (Ob a, Ob b, Ob x) => Act (ProdAction :: k -> (PROD k, k) -> Type) (a ** b) x ~> Act (ProdAction :: k -> (PROD k, k) -> Type) a (Act (ProdAction :: k -> (PROD k, k) -> Type) b x) Source Github #

multiplicatorInv :: forall (a :: PROD k) (b :: PROD k) (x :: k). (Ob a, Ob b, Ob x) => Act (ProdAction :: k -> (PROD k, k) -> Type) a (Act (ProdAction :: k -> (PROD k, k) -> Type) b x) ~> Act (ProdAction :: k -> (PROD k, k) -> Type) (a ** b) x Source Github #

Costrong (CoprodAction :: LINEAR -> (COPROD LINEAR, LINEAR) -> Type) Linear Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

coact :: forall (a :: COPROD LINEAR) (x :: LINEAR) (y :: LINEAR). (Ob a, Ob x, Ob y) => Linear (Act (CoprodAction :: LINEAR -> (COPROD LINEAR, LINEAR) -> Type) a x) (Act (CoprodAction :: LINEAR -> (COPROD LINEAR, LINEAR) -> Type) a y) -> Linear x y Source Github #

Cartesian k => Costrong (ProdAction :: k -> (PROD k, k) -> Type) (Fold :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Fold

Methods

coact :: forall (a :: PROD k) (x :: k) (y :: k). (Ob a, Ob x, Ob y) => Fold (Act (ProdAction :: k -> (PROD k, k) -> Type) a x) (Act (ProdAction :: k -> (PROD k, k) -> Type) a y) -> Fold x y Source Github #

MonadPlus m => Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Kleisli m :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Arrow

Methods

act :: forall (a :: COPROD Type) x y. Ob a => Kleisli m x y -> Kleisli m (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a x) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a y) Source Github #

BiCCC k => Strong (CoprodAction :: k -> (COPROD k, k) -> Type) (Fold :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Fold

Methods

act :: forall (a :: COPROD k) (x :: k) (y :: k). Ob a => Fold x y -> Fold (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a x) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a y) Source Github #

(CopyDiscard k, HasCoproducts k, SNatI n) => Strong (CoprodAction :: k -> (COPROD k, k) -> Type) (Pow n :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.PowerGrate

Methods

act :: forall (a :: COPROD k) (x :: k) (y :: k). Ob a => Pow n x y -> Pow n (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a x) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a y) Source Github #

Applicative f => Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Star f :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

Methods

act :: forall (a :: COPROD Type) x y. Ob a => Star f x y -> Star f (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a x) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a y) Source Github #

(Monoidal k, HasCoproducts k, Monoid m) => Strong (CoprodAction :: k -> (COPROD k, k) -> Type) (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

act :: forall (a :: COPROD k) (x :: k) (y :: k). Ob a => Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) x y -> Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a x) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a y) Source Github #

(Closed k, HasCoproducts k, Comonoid m) => Strong (CoprodAction :: k -> (COPROD k, k) -> Type) (Rep (Exp m) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

act :: forall (a :: COPROD k) (x :: k) (y :: k). Ob a => Rep (Exp m) x y -> Rep (Exp m) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a x) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a y) Source Github #

(CopyDiscard k, HasCoproducts k, Monoid r) => Strong (CoprodAction :: k -> (COPROD k, k) -> Type) (Rep (Constant r) :: k -> k -> Type) Source Github #

The constant functor absorbs a coproduct action: the injected summand is discarded onto the monoid's unit, so this needs only copying/discarding on the tensor side and coproducts.

Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

act :: forall (a :: COPROD k) (x :: k) (y :: k). Ob a => Rep (Constant r) x y -> Rep (Constant r) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a x) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a y) Source Github #

Functor f => Strong (ProdAction :: Type -> (PROD Type, Type) -> Type) (Star (Prelude f) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

Methods

act :: forall (a :: PROD Type) x y. Ob a => Star (Prelude f) x y -> Star (Prelude f) (Act (ProdAction :: Type -> (PROD Type, Type) -> Type) a x) (Act (ProdAction :: Type -> (PROD Type, Type) -> Type) a y) Source Github #

(HasCoproducts k, Ob a, Ob b, Flavor w, forall (t :: k). Ob t => w (Rep (Coproduct t)) (Corep (Coproduct t))) => Strong (CoprodAction :: k -> (COPROD k, k) -> Type) (ExOptic w a b :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.MonoidalTraversal

Methods

act :: forall (a0 :: COPROD k) (x :: k) (y :: k). Ob a0 => ExOptic w a b x y -> ExOptic w a b (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a0 x) (Act (CoprodAction :: k -> (COPROD k, k) -> Type) a0 y) Source Github #

(HasProducts k, Ob a, Ob b, Flavor w, forall (s :: k). Ob s => w (Rep (Product s)) (Corep (Product s))) => Strong (ProdAction :: k -> (PROD k, k) -> Type) (ExOptic w a b :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Optic.MonoidalTraversal

Methods

act :: forall (a0 :: PROD k) (x :: k) (y :: k). Ob a0 => ExOptic w a b x y -> ExOptic w a b (Act (ProdAction :: k -> (PROD k, k) -> Type) a0 x) (Act (ProdAction :: k -> (PROD k, k) -> Type) a0 y) Source Github #

Num a => MonoidalProfunctor (Rep (App :: MatK a +-> Type) :: Type -> MatK a -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

one :: Rep (App :: MatK a +-> Type) (Unit :: Type) (Unit :: MatK a) Source Github #

(**) :: forall x1 (x2 :: MatK a) y1 (y2 :: MatK a). Rep (App :: MatK a +-> Type) x1 x2 -> Rep (App :: MatK a +-> Type) y1 y2 -> Rep (App :: MatK a +-> Type) (x1 ** y1) (x2 ** y2) 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 => MonoidalProfunctor (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) :: MatK (Complex a) -> MatK (Complex a) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

one :: Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) (Unit :: MatK (Complex a)) (Unit :: MatK (Complex a)) Source Github #

(**) :: forall (x1 :: MatK (Complex a)) (x2 :: MatK (Complex a)) (y1 :: MatK (Complex a)) (y2 :: MatK (Complex a)). Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) x1 x2 -> Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) y1 y2 -> Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) (x1 ** y1) (x2 ** y2) Source Github #

MonoidalProfunctor (Coprod (Rep Fun)) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

Methods

one :: Coprod (Rep Fun) (Unit :: COPROD FINREL) (Unit :: COPROD FINSET) Source Github #

(**) :: forall (x1 :: COPROD FINREL) (x2 :: COPROD FINSET) (y1 :: COPROD FINREL) (y2 :: COPROD FINSET). Coprod (Rep Fun) x1 x2 -> Coprod (Rep Fun) y1 y2 -> Coprod (Rep Fun) (x1 ** y1) (x2 ** y2) Source Github #

(Monoidal k, HasCoproducts k, Ob m) => MonoidalProfunctor (Coprod (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m)) :: COPROD k -> COPROD k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

one :: Coprod (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m)) (Unit :: COPROD k) (Unit :: COPROD k) Source Github #

(**) :: forall (x1 :: COPROD k) (x2 :: COPROD k) (y1 :: COPROD k) (y2 :: COPROD k). Coprod (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m)) x1 x2 -> Coprod (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m)) y1 y2 -> Coprod (Rep (ActionAt (Tensor :: k -> (k, k) -> Type) m)) (x1 ** y1) (x2 ** y2) Source Github #

(Closed k, HasCoproducts k, Ob m) => MonoidalProfunctor (Coprod (Rep (Exp m)) :: COPROD k -> COPROD k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

one :: Coprod (Rep (Exp m)) (Unit :: COPROD k) (Unit :: COPROD k) Source Github #

(**) :: forall (x1 :: COPROD k) (x2 :: COPROD k) (y1 :: COPROD k) (y2 :: COPROD k). Coprod (Rep (Exp m)) x1 x2 -> Coprod (Rep (Exp m)) y1 y2 -> Coprod (Rep (Exp m)) (x1 ** y1) (x2 ** y2) Source Github #

(HasCoproducts k, Ob r) => MonoidalProfunctor (Coprod (Rep (Constant r)) :: COPROD k -> COPROD k -> Type) Source Github # 
Instance details

Defined in Proarrow.Monoid

Methods

one :: Coprod (Rep (Constant r)) (Unit :: COPROD k) (Unit :: COPROD k) Source Github #

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

MonoidalAction t => MonoidalAction (Rep (OpAction t) :: OPPOSITE k -> (OPPOSITE m, OPPOSITE k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

unitor :: forall (x :: OPPOSITE k). Ob x => Act (Rep (OpAction t)) (Unit :: OPPOSITE m) x ~> x Source Github #

unitorInv :: forall (x :: OPPOSITE k). Ob x => x ~> Act (Rep (OpAction t)) (Unit :: OPPOSITE m) x Source Github #

multiplicator :: forall (a :: OPPOSITE m) (b :: OPPOSITE m) (x :: OPPOSITE k). (Ob a, Ob b, Ob x) => Act (Rep (OpAction t)) (a ** b) x ~> Act (Rep (OpAction t)) a (Act (Rep (OpAction t)) b x) Source Github #

multiplicatorInv :: forall (a :: OPPOSITE m) (b :: OPPOSITE m) (x :: OPPOSITE k). (Ob a, Ob b, Ob x) => Act (Rep (OpAction t)) a (Act (Rep (OpAction t)) b x) ~> Act (Rep (OpAction t)) (a ** b) x 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 #

(CategoryOf j, CategoryOf k) => Strong (ProdAction :: (j +-> k) -> (PROD (j +-> k), j +-> k) -> Type) (Prof :: (j +-> k) -> (j +-> k) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

act :: forall (a :: PROD (j +-> k)) (x :: j +-> k) (y :: j +-> k). Ob a => Prof x y -> Prof (Act (ProdAction :: (j +-> k) -> (PROD (j +-> k), j +-> k) -> Type) a x) (Act (ProdAction :: (j +-> k) -> (PROD (j +-> k), j +-> k) -> Type) a y) Source Github #

(CategoryOf h, CategoryOf x) => MonoidalAction (Rep Precomp :: (x +-> h) -> (REV (ENDO x), x +-> h) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.EndoProf

Methods

unitor :: forall (x0 :: x +-> h). Ob x0 => Act (Rep Precomp) (Unit :: REV (ENDO x)) x0 ~> x0 Source Github #

unitorInv :: forall (x0 :: x +-> h). Ob x0 => x0 ~> Act (Rep Precomp) (Unit :: REV (ENDO x)) x0 Source Github #

multiplicator :: forall (a :: REV (ENDO x)) (b :: REV (ENDO x)) (x0 :: x +-> h). (Ob a, Ob b, Ob x0) => Act (Rep Precomp) (a ** b) x0 ~> Act (Rep Precomp) a (Act (Rep Precomp) b x0) Source Github #

multiplicatorInv :: forall (a :: REV (ENDO x)) (b :: REV (ENDO x)) (x0 :: x +-> h). (Ob a, Ob b, Ob x0) => Act (Rep Precomp) a (Act (Rep Precomp) b x0) ~> Act (Rep Precomp) (a ** b) x0 Source Github #

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

Defined in Proarrow.Category.Instance.Mat

Methods

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

MonoidalAction ApplyAction Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Nat

Methods

unitor :: Ob x => Act ApplyAction (Unit :: Type -> Type) x ~> x Source Github #

unitorInv :: Ob x => x ~> Act ApplyAction (Unit :: Type -> Type) x Source Github #

multiplicator :: forall (a :: Type -> Type) (b :: Type -> Type) x. (Ob a, Ob b, Ob x) => Act ApplyAction (a ** b) x ~> Act ApplyAction a (Act ApplyAction b x) Source Github #

multiplicatorInv :: forall (a :: Type -> Type) (b :: Type -> Type) x. (Ob a, Ob b, Ob x) => Act ApplyAction a (Act ApplyAction b x) ~> Act ApplyAction (a ** b) x 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 #

(Monoidal k2, Monoidal (SUBCAT ob), MonoidalAction t) => MonoidalAction (SubAction ob t :: k1 -> (SUBCAT ob, k1) -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

unitor :: forall (x :: k1). Ob x => Act (SubAction ob t) (Unit :: SUBCAT ob) x ~> x Source Github #

unitorInv :: forall (x :: k1). Ob x => x ~> Act (SubAction ob t) (Unit :: SUBCAT ob) x Source Github #

multiplicator :: forall (a :: SUBCAT ob) (b :: SUBCAT ob) (x :: k1). (Ob a, Ob b, Ob x) => Act (SubAction ob t) (a ** b) x ~> Act (SubAction ob t) a (Act (SubAction ob t) b x) Source Github #

multiplicatorInv :: forall (a :: SUBCAT ob) (b :: SUBCAT ob) (x :: k1). (Ob a, Ob b, Ob x) => Act (SubAction ob t) a (Act (SubAction ob t) b x) ~> Act (SubAction ob t) (a ** b) x Source Github #

Applicative f => Strong (SubAction Traversable ApplyAction) (Star (Prelude f) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Star

type HasArrowComp 'ByRight (p :: j +-> k) (Rep g :: j -> i -> Type) (a :: k) (c :: i) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

type HasArrowComp 'ByRight (p :: j +-> k) (Rep g :: j -> i -> Type) (a :: k) (c :: i) = HasArrow p a (g @ c)
type HoldsComp 'ByRight (p :: j +-> k) (Rep g :: j -> i -> Type) (a :: k) (c :: i) Source Github # 
Instance details

Defined in Proarrow.Category.Enriched.Thin.Composition

type HoldsComp 'ByRight (p :: j +-> k) (Rep g :: j -> i -> Type) (a :: k) (c :: i) = Holds p a (g @ c)
type Colimit (Rep f :: i -> a -> Type) (d :: k +-> i) Source Github # 
Instance details

Defined in Proarrow.Colimit

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

Defined in Proarrow.Category.Instance.Linear

type (Rep Forget) %% (a :: Type) = 'L (Ur a)
type (Rep f :: k -> j -> Type) % (a :: j) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Representable

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

Defined in Proarrow.Profunctor.Representable

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

Defined in Proarrow.Profunctor.Representable

type Holds (Rep f :: k -> j -> Type) (a :: k) (b :: j) = Holds (Hom k) a (f @ b)
type (Rep (Not r) :: k -> OPPOSITE k -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Closed

type (Rep (Not r) :: k -> OPPOSITE k -> Type) %% (a :: k) = 'OP (a ~~> r)
type (Rep (Forget ob) :: k -> SUBCAT ob -> Type) %% (a :: k) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Free

type (Rep (Forget ob) :: k -> SUBCAT ob -> Type) %% (a :: k) = 'SUB (Free ob a) :: SUBCAT ob
type (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) :: MatK (Complex a) -> MatK (Complex a) -> Type) %% (n :: MatK (Complex a)) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

type (Rep (Conjugate :: MatK (Complex a) +-> MatK (Complex a)) :: MatK (Complex a) -> MatK (Complex a) -> Type) %% (n :: MatK (Complex a)) = n
type (Rep (Diag :: k +-> (k, k)) :: (k, k) -> k -> Type) %% ('(a, b) :: (k, k)) Source Github # 
Instance details

Defined in Proarrow.Colimit.BinaryCoproduct

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

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

Orphan instances

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

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 #