proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.Strength

Synopsis

Documentation

class (MonoidalAction t, Profunctor p) => Strong (t :: (m, k) +-> k) (p :: k +-> k) where Source Github #

Profuntorial strength for a monoidal actions. Gives functorial strength for representable profunctors, and functorial costrength for corepresentable profunctors.

Methods

act :: forall (a :: m) (x :: k) (y :: k). Ob a => p x y -> p (Act t a x) (Act t a y) Source Github #

Instances

Instances details
MonoidalAction t => Strong (t :: (m, k) +-> k) (Id :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

act :: forall (a :: m) (x :: k) (y :: k). Ob a => Id x y -> Id (Act t a x) (Act t a y) Source Github #

Strong t p => Strong (t :: (m, k) +-> k) (Fix p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Fix

Methods

act :: forall (a :: m) (x :: k) (y :: k). Ob a => Fix p x y -> Fix p (Act t a x) (Act t a y) Source Github #

(Strong t p, Strong t q) => Strong (t :: (m, j) +-> j) (p :+: q :: j -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

act :: forall (a :: m) (x :: j) (y :: j). Ob a => (p :+: q) x y -> (p :+: q) (Act t a x) (Act t a y) Source Github #

(Strong t p, Strong t q) => Strong (t :: (m, j) +-> j) (p :*: q :: j -> j -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

act :: forall (a :: m) (x :: j) (y :: j). Ob a => (p :*: q) x y -> (p :*: q) (Act t a x) (Act t a y) Source Github #

(MonoidalAction t, Profunctor p) => Strong (t :: (m, k) +-> k) (Pastro t p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

act :: forall (a :: m) (x :: k) (y :: k). Ob a => Pastro t p x y -> Pastro t p (Act t a x) (Act t a y) Source Github #

(MonoidalAction t, Profunctor p) => Strong (t :: (m, k) +-> k) (Tambara t p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.PastroTambara

Methods

act :: forall (a :: m) (x :: k) (y :: k). Ob a => Tambara t p x y -> Tambara t p (Act t a x) (Act t a y) Source Github #

(Strong t p, Strong t q) => Strong (t :: (m, i) +-> i) (p :.: q :: i -> i -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Instance.Composition

Methods

act :: forall (a :: m) (x :: i) (y :: i). Ob a => (p :.: q) x y -> (p :.: q) (Act t a x) (Act t a y) Source Github #

MonoidalAction act => Strong (act :: (m, k) +-> k) (ExOptic act a b :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

Costrong act p => Strong (act :: (m, k1) +-> k1) (Re p s t :: k1 -> k1 -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a :: m) (x :: k1) (y :: k1). Ob a => Re p s t x y -> Re p s t (Act act a x) (Act act a 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 #

Strong (Tensor :: Type -> (Type, Type) -> Type) (Replacing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: Ob a0 => Replacing a b x y -> Replacing a b (Act (Tensor :: Type -> (Type, Type) -> Type) a0 x) (Act (Tensor :: Type -> (Type, Type) -> Type) a0 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 #

(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 #

(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 #

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 #

Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Previewing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Replacing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

Strong (ProdAction :: Type -> (PROD Type, Type) -> Type) (Previewing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

Strong (CoprodAction :: Type -> (COPROD Type, Type) -> Type) (Rep (Constant (First c)) :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a :: COPROD Type) x y. Ob a => Rep (Constant (First c)) x y -> Rep (Constant (First c)) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> Type) a x) (Act (CoprodAction :: Type -> (COPROD Type, Type) -> 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 #

(Cartesian k, Ob c) => Strong (ProdAction :: k -> (PROD k, k) -> Type) (Rep (Constant c) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

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

Monad m => Strong (Tensor :: KlCat m -> (KlCat m, KlCat m) -> Type) (Updating a b :: KlCat m -> KlCat m -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: KlCat m) (x :: KlCat m) (y :: KlCat m). Ob a0 => Updating a b x y -> Updating a b (Act (Tensor :: KlCat m -> (KlCat m, KlCat m) -> Type) a0 x) (Act (Tensor :: KlCat m -> (KlCat m, KlCat m) -> Type) a0 y) Source Github #

Strong ApplyAction (Replacing a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: Type -> Type) x y. Ob a0 => Replacing a b x y -> Replacing a b (Act ApplyAction a0 x) (Act ApplyAction a0 y) Source Github #

Monad m => Strong (AlgAction m :: Type -> (SUBCAT (Algebra m), Type) -> Type) (Classifying m a b :: Type -> Type -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

act :: forall (a0 :: SUBCAT (Algebra m)) x y. Ob a0 => Classifying m a b x y -> Classifying m a b (Act (AlgAction m) a0 x) (Act (AlgAction m) a0 y) 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 MonStrong (p :: k +-> k) = (Strong (Tensor :: k -> (k, k) -> Type) p, SymMonoidal k) Source Github #

strength :: forall {k} {m} (t :: (m, k) +-> k) (p :: k +-> k) (a :: m) (b :: k). (Representable p, Strong t p, Ob a, Ob b) => Act t a (p % b) ~> (p % Act t a b) Source Github #

If a strong profunctor is representable, we get the usual strength for the representing functor.

costrength :: forall {j} {m} (t :: (m, j) +-> j) (p :: j +-> j) (a :: m) (b :: j). (Corepresentable p, Strong t p, Ob a, Ob b) => (p %% Act t a b) ~> Act t a (p %% b) Source Github #

If a strong profunctor is corepresentable, we get the usual costrength for the representing functor.

first' :: forall {k} {p} (c :: k) (a :: k) (b :: k). (MonStrong p, Ob c) => p a b -> p (a ** c) (b ** c) Source Github #

second' :: forall {k} {p} (c :: k) (a :: k) (b :: k). (MonStrong p, Ob c) => p a b -> p (c ** a) (c ** b) Source Github #

left' :: forall {k} p (c :: k) (a :: k) (b :: k). (Strong (CoprodAction :: k -> (COPROD k, k) -> Type) p, HasBinaryCoproducts k, Ob c) => p a b -> p (a || c) (b || c) Source Github #

right' :: forall {k} p (c :: k) (a :: k) (b :: k). (Strong (CoprodAction :: k -> (COPROD k, k) -> Type) p, Ob c) => p a b -> p (c || a) (c || b) Source Github #

premon :: forall {k} {p} (a :: k) (b :: k) (c :: k) (d :: k). (MonStrong p, Promonad p) => p a b -> p c d -> p (a ** c) (b ** d) Source Github #

This is not monoidal ** but premonoidal, i.e. no sliding. So with `premon f g` the effects of f happen before the effects of g. p needs to be a commutative promonad for this to be monoidal **.

strongId :: forall {k} {p} (a :: k). (MonStrong p, MonoidalProfunctor p, Ob a) => p a a Source Github #

monActDefault :: forall {k} {p} (a :: k) (x :: k) (y :: k). (MonoidalProfunctor p, Promonad p, Ob a) => p x y -> p (a ** x) (a ** y) Source Github #

A monoidal promonad is automatically strong.

class (MonoidalAction t, Profunctor p) => Costrong (t :: (m, k) +-> k) (p :: k +-> k) where Source Github #

Methods

coact :: forall (a :: m) (x :: k) (y :: k). (Ob a, Ob x, Ob y) => p (Act t a x) (Act t a y) -> p x y Source Github #

Instances

Instances details
MonoidalAction t => Costrong (t :: (Nat, Nat) +-> Nat) ZX Source Github # 
Instance details

Defined in Proarrow.Category.Instance.ZX

Methods

coact :: forall (a :: Nat) (x :: Nat) (y :: Nat). (Ob a, Ob x, Ob y) => ZX (Act t a x) (Act t a y) -> ZX x y Source Github #

MonoidalAction t => Costrong (t :: (KIND, KIND) +-> KIND) Cat Source Github # 
Instance details

Defined in Proarrow.Category.Instance.CatProf

Methods

coact :: forall (a :: KIND) (x :: KIND) (y :: KIND). (Ob a, Ob x, Ob y) => Cat (Act t a x) (Act t a y) -> Cat x y Source Github #

MonoidalAction t => Costrong (t :: (FINREL, FINREL) +-> FINREL) FinRel Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

Methods

coact :: forall (a :: FINREL) (x :: FINREL) (y :: FINREL). (Ob a, Ob x, Ob y) => FinRel (Act t a x) (Act t a y) -> FinRel x y Source Github #

(MonoidalAction t, Costrong t (Hom k)) => Costrong (t :: (m, k) +-> k) (Id :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength

Methods

coact :: forall (a :: m) (x :: k) (y :: k). (Ob a, Ob x, Ob y) => Id (Act t a x) (Act t a y) -> Id x y Source Github #

Strong act p => Costrong (act :: (m, k1) +-> k1) (Re p s t :: k1 -> k1 -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Optic

Methods

coact :: forall (a :: m) (x :: k1) (y :: k1). (Ob a, Ob x, Ob y) => Re p s t (Act act a x) (Act act a y) -> Re p s t x y 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 #

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 #

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 #

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 #

(Num a, MonoidalAction t) => Costrong (t :: (MatK a, MatK a) +-> MatK a) (Mat :: MatK a -> MatK a -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

coact :: forall (a0 :: MatK a) (x :: MatK a) (y :: MatK a). (Ob a0, Ob x, Ob y) => Mat (Act t a0 x) (Act t a0 y) -> Mat x y Source Github #

trace :: forall {k} p (u :: k) (x :: k) (y :: k). (Costrong (Tensor :: k -> (k, k) -> Type) p, Ob x, Ob y, Ob u, SymMonoidal k) => p (x ** u) (y ** u) -> p x y Source Github #

class (Costrong (Tensor :: k -> (k, k) -> Type) (Hom k), SymMonoidal k) => TracedMonoidal k Source Github #

Instances

Instances details
(Costrong (Tensor :: k -> (k, k) -> Type) (Hom k), SymMonoidal k) => TracedMonoidal k Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Strength