proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.Action

Description

Actions of a monoidal category on another category: a MonoidalAction is a representable profunctor t :: (m, k) +-> k acting as Act t a x, with unitor and multiplicator coherences. Main instances are the tensor acting on its own category, the cartesian product (ProdAction) and the coproduct (CoprodAction).

Synopsis

Documentation

type Act (t :: (m, k) +-> k) (a :: m) (x :: k) = t % '(a, x) Source Github #

class (Representable t, Monoidal m) => MonoidalAction (t :: (m, k) +-> k) where Source Github #

An action of a monoidal category m on a category k, given by a representable profunctor t whose functor is Act t. This is Monoidal with the two sides allowed to differ: taking k = m and t the tensor recovers it.

Laws:

The two isomorphisms must be mutually inverse:

natural in every argument (via actHom), and coherent with the monoidal structure of m:

Proarrow.Testing.Laws has no check for these laws.

Methods

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

Acting by the Unit does nothing.

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

Inverse to unitor.

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

Acting by a tensor is acting twice.

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

Inverse to multiplicator.

Instances

Instances details
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 #

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 #

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 #

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 #

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

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 #

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

actHom :: forall {m} {k} (t :: (m, k) +-> k) (a :: m) (b :: m) (x :: k) (y :: k). Representable t => (a ~> b) -> (x ~> y) -> Act t a x ~> Act t b y Source Github #

composeActs :: forall {m} {k} (t :: (m, k) +-> k) (x :: m) (y :: m) (c :: k) (a :: k) (b :: k). (MonoidalAction t, Ob x, Ob y, Ob c) => (a ~> Act t x b) -> (b ~> Act t y c) -> a ~> Act t (x ** y) c Source Github #

decomposeActs :: forall {m} {k} (t :: (m, k) +-> k) (x :: m) (y :: m) (c :: k) (a :: k) (b :: k). (MonoidalAction t, Ob x, Ob y, Ob c) => (Act t y c ~> b) -> (Act t x b ~> a) -> Act t (x ** y) c ~> a Source Github #

data family ActionAt :: ((m, k) +-> k) -> m -> k +-> k Source Github #

The dual of Act partially applied at a fixed acted-on object: Act fixes the acted-on object and varies the index, this fixes the index x and varies the acted-on object.

Instances

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

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

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

(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

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 #

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 #

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 #

(MonoidalAction act, Ob x) => FunctorForRep (ActionAt act x :: k +-> k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

fmap :: forall (a :: k) (b :: k). (a ~> b) -> (ActionAt act x @ a) ~> (ActionAt act x @ b) 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 #

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 #

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

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

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 #

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

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

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 #

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 #

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

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

type (ActionAt act x :: k +-> k) @ (a :: k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

type (ActionAt act x :: k +-> k) @ (a :: k) = Act act x a

data family NoAction :: ((), k) +-> k Source Github #

Instances

Instances details
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 #

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

Defined in Proarrow.Category.Monoidal.Action

Methods

fmap :: forall (a :: ((), k)) (b :: ((), k)). (a ~> b) -> ((NoAction :: ((), k) +-> k) @ a) ~> ((NoAction :: ((), k) +-> k) @ b) Source Github #

type (NoAction :: ((), k) +-> k) @ ('(a, x) :: ((), k)) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

type (NoAction :: ((), k) +-> k) @ ('(a, x) :: ((), k)) = x

data family OpAction :: ((m, k) +-> k) -> (OPPOSITE m, OPPOSITE k) +-> OPPOSITE k Source Github #

Instances

Instances details
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 #

(Representable t, CategoryOf m) => FunctorForRep (OpAction t :: (OPPOSITE m, OPPOSITE k) +-> OPPOSITE k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

fmap :: forall (a :: (OPPOSITE m, OPPOSITE k)) (b :: (OPPOSITE m, OPPOSITE k)). (a ~> b) -> (OpAction t @ a) ~> (OpAction t @ b) Source Github #

type (OpAction t :: (OPPOSITE m, OPPOSITE k) +-> OPPOSITE k) @ ('('OP a, 'OP x) :: (OPPOSITE m, OPPOSITE k)) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

type (OpAction t :: (OPPOSITE m, OPPOSITE k) +-> OPPOSITE k) @ ('('OP a, 'OP x) :: (OPPOSITE m, OPPOSITE k)) = 'OP (t % '(a, x))

type SubAction (ob :: OB m) (t :: (m, k) +-> k) = Rep (SubAction' ob t) Source Github #

data family SubAction' :: forall (ob :: OB m) -> ((m, k) +-> k) -> (SUBCAT ob, k) +-> k Source Github #

Instances

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

(Monoidal k2, Monoidal (SUBCAT ob), Representable t) => FunctorForRep (SubAction' ob t :: (SUBCAT ob, k1) +-> k1) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

fmap :: forall (a :: (SUBCAT ob, k1)) (b :: (SUBCAT ob, k1)). (a ~> b) -> (SubAction' ob t @ a) ~> (SubAction' ob t @ b) 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 (SubAction' ob t :: (SUBCAT ob, k2) +-> k2) @ ('('SUB a :: SUBCAT ob, x) :: (SUBCAT ob, k2)) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

type (SubAction' ob t :: (SUBCAT ob, k2) +-> k2) @ ('('SUB a :: SUBCAT ob, x) :: (SUBCAT ob, k2)) = t % '(a, x)

data family ProdAction' :: (PROD k, k) +-> k Source Github #

Instances

Instances details
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 #

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 #

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 #

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

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

HasProducts k => FunctorForRep (ProdAction' :: (PROD k, k) +-> k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

fmap :: forall (a :: (PROD k, k)) (b :: (PROD k, k)). (a ~> b) -> ((ProdAction' :: (PROD k, k) +-> k) @ a) ~> ((ProdAction' :: (PROD k, k) +-> k) @ b) Source Github #

type (ProdAction' :: (PROD k, k) +-> k) @ ('('PR a, b) :: (PROD k, k)) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

type (ProdAction' :: (PROD k, k) +-> k) @ ('('PR a, b) :: (PROD k, k)) = a && b

data family CoprodAction' :: (COPROD k, k) +-> k Source Github #

Instances

Instances details
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 #

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 #

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 #

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

HasCoproducts k => FunctorForRep (CoprodAction' :: (COPROD k, k) +-> k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

Methods

fmap :: forall (a :: (COPROD k, k)) (b :: (COPROD k, k)). (a ~> b) -> ((CoprodAction' :: (COPROD k, k) +-> k) @ a) ~> ((CoprodAction' :: (COPROD k, k) +-> k) @ b) Source Github #

type (CoprodAction' :: (COPROD k, k) +-> k) @ ('('COPR a, x) :: (COPROD k, k)) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Action

type (CoprodAction' :: (COPROD k, k) +-> k) @ ('('COPR a, x) :: (COPROD k, k)) = a || x