proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.Distributive

Synopsis

Documentation

class (Monoidal k, HasCoproducts k, DistributiveProfunctor (Id :: k -> k -> Type)) => Distributive k where Source Github #

Methods

distL :: forall (a :: k) (b :: k) (c :: k). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: k) (b :: k) (c :: k). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: k). Ob a => (a ** (InitialObject :: k)) ~> (InitialObject :: k) Source Github #

distR0 :: forall (a :: k). Ob a => ((InitialObject :: k) ** a) ~> (InitialObject :: k) Source Github #

Instances

Instances details
Distributive BOOL Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Bool

Methods

distL :: forall (a :: BOOL) (b :: BOOL) (c :: BOOL). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: BOOL) (b :: BOOL) (c :: BOOL). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: BOOL). Ob a => (a ** (InitialObject :: BOOL)) ~> (InitialObject :: BOOL) Source Github #

distR0 :: forall (a :: BOOL). Ob a => ((InitialObject :: BOOL) ** a) ~> (InitialObject :: BOOL) Source Github #

Distributive COST Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cost

Methods

distL :: forall (a :: COST) (b :: COST) (c :: COST). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: COST) (b :: COST) (c :: COST). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: COST). Ob a => (a ** (InitialObject :: COST)) ~> (InitialObject :: COST) Source Github #

distR0 :: forall (a :: COST). Ob a => ((InitialObject :: COST) ** a) ~> (InitialObject :: COST) Source Github #

Distributive FINREL Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

Methods

distL :: forall (a :: FINREL) (b :: FINREL) (c :: FINREL). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: FINREL) (b :: FINREL) (c :: FINREL). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: FINREL). Ob a => (a ** (InitialObject :: FINREL)) ~> (InitialObject :: FINREL) Source Github #

distR0 :: forall (a :: FINREL). Ob a => ((InitialObject :: FINREL) ** a) ~> (InitialObject :: FINREL) Source Github #

Distributive FINSET Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinSet

Methods

distL :: forall (a :: FINSET) (b :: FINSET) (c :: FINSET). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: FINSET) (b :: FINSET) (c :: FINSET). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: FINSET). Ob a => (a ** (InitialObject :: FINSET)) ~> (InitialObject :: FINSET) Source Github #

distR0 :: forall (a :: FINSET). Ob a => ((InitialObject :: FINSET) ** a) ~> (InitialObject :: FINSET) Source Github #

Distributive LINEAR Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

distL :: forall (a :: LINEAR) (b :: LINEAR) (c :: LINEAR). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: LINEAR) (b :: LINEAR) (c :: LINEAR). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: LINEAR). Ob a => (a ** (InitialObject :: LINEAR)) ~> (InitialObject :: LINEAR) Source Github #

distR0 :: forall (a :: LINEAR). Ob a => ((InitialObject :: LINEAR) ** a) ~> (InitialObject :: LINEAR) Source Github #

Distributive () Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

distL :: forall (a :: ()) (b :: ()) (c :: ()). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: ()) (b :: ()) (c :: ()). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: ()). Ob a => (a ** (InitialObject :: ())) ~> (InitialObject :: ()) Source Github #

distR0 :: forall (a :: ()). Ob a => ((InitialObject :: ()) ** a) ~> (InitialObject :: ()) Source Github #

Distributive Type Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

distL :: (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: Ob a => (a ** (InitialObject :: Type)) ~> (InitialObject :: Type) Source Github #

distR0 :: Ob a => ((InitialObject :: Type) ** a) ~> (InitialObject :: Type) Source Github #

Num a => Distributive (MatK a) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

distL :: forall (a0 :: MatK a) (b :: MatK a) (c :: MatK a). (Ob a0, Ob b, Ob c) => (a0 ** (b || c)) ~> ((a0 ** b) || (a0 ** c)) Source Github #

distR :: forall (a0 :: MatK a) (b :: MatK a) (c :: MatK a). (Ob a0, Ob b, Ob c) => ((a0 || b) ** c) ~> ((a0 ** c) || (b ** c)) Source Github #

distL0 :: forall (a0 :: MatK a). Ob a0 => (a0 ** (InitialObject :: MatK a)) ~> (InitialObject :: MatK a) Source Github #

distR0 :: forall (a0 :: MatK a). Ob a0 => ((InitialObject :: MatK a) ** a0) ~> (InitialObject :: MatK a) Source Github #

BiCCC k => Distributive (PROD k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

distL :: forall (a :: PROD k) (b :: PROD k) (c :: PROD k). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: PROD k) (b :: PROD k) (c :: PROD k). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: PROD k). Ob a => (a ** (InitialObject :: PROD k)) ~> (InitialObject :: PROD k) Source Github #

distR0 :: forall (a :: PROD k). Ob a => ((InitialObject :: PROD k) ** a) ~> (InitialObject :: PROD k) Source Github #

(Distributive k, Promonad p, DistributiveProfunctor p) => Distributive (KLEISLI p) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Kleisli

Methods

distL :: forall (a :: KLEISLI p) (b :: KLEISLI p) (c :: KLEISLI p). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: KLEISLI p) (b :: KLEISLI p) (c :: KLEISLI p). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: KLEISLI p). Ob a => (a ** (InitialObject :: KLEISLI p)) ~> (InitialObject :: KLEISLI p) Source Github #

distR0 :: forall (a :: KLEISLI p). Ob a => ((InitialObject :: KLEISLI p) ** a) ~> (InitialObject :: KLEISLI p) Source Github #

(Monoidal j, Monoidal k) => Distributive (j +-> k) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Day

Methods

distL :: forall (a :: j +-> k) (b :: j +-> k) (c :: j +-> k). (Ob a, Ob b, Ob c) => (a ** (b || c)) ~> ((a ** b) || (a ** c)) Source Github #

distR :: forall (a :: j +-> k) (b :: j +-> k) (c :: j +-> k). (Ob a, Ob b, Ob c) => ((a || b) ** c) ~> ((a ** c) || (b ** c)) Source Github #

distL0 :: forall (a :: j +-> k). Ob a => (a ** (InitialObject :: j +-> k)) ~> (InitialObject :: j +-> k) Source Github #

distR0 :: forall (a :: j +-> k). Ob a => ((InitialObject :: j +-> k) ** a) ~> (InitialObject :: j +-> k) Source Github #

distLInv :: forall {k} (a :: k) (b :: k) (c :: k). (Monoidal k, HasCoproducts k, Ob a, Ob b, Ob c) => ((a ** b) || (a ** c)) ~> (a ** (b || c)) Source Github #

distRInv :: forall {k} (a :: k) (b :: k) (c :: k). (Monoidal k, HasCoproducts k, Ob a, Ob b, Ob c) => ((a ** c) || (b ** c)) ~> ((a || b) ** c) Source Github #

distLProd :: forall {k} (a :: k) (b :: k) (c :: k). (BiCCC k, Ob a, Ob b, Ob c) => (a && (b || c)) ~> ((a && b) || (a && c)) Source Github #

distRProd :: forall {k} (a :: k) (b :: k) (c :: k). (BiCCC k, Ob a, Ob b, Ob c) => ((a || b) && c) ~> ((a && c) || (b && c)) Source Github #

class Profunctor t => Traversable (t :: k +-> k) where Source Github #

Methods

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

Instances

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

Defined in Proarrow.Category.Monoidal.Distributive

Methods

traverse :: forall (p :: k +-> k). StrongDistributiveProfunctor p => ((Id :: k -> k -> Type) :.: p) :~> (p :.: (Id :: k -> k -> Type)) Source Github #

Traversable (->) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

traverse :: forall (p :: Type +-> Type). StrongDistributiveProfunctor p => ((->) :.: p) :~> (p :.: (->)) Source Github #

Traversable p => Traversable (Fix p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Fix

Methods

traverse :: forall (p0 :: k +-> k). StrongDistributiveProfunctor p0 => (Fix p :.: p0) :~> (p0 :.: Fix p) Source Github #

(Monoid w, Monoidal k) => Traversable (Writer w :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Writer

Methods

traverse :: forall (p :: k +-> k). StrongDistributiveProfunctor p => (Writer w :.: p) :~> (p :.: Writer w) Source Github #

Traversable (Star Maybe) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Star

Traversable (Star []) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Star

SelfAction k => Traversable (HaskValue c :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.HaskValue

Methods

traverse :: forall (p :: k +-> k). StrongDistributiveProfunctor p => ((HaskValue c :: k -> k -> Type) :.: p) :~> (p :.: (HaskValue c :: k -> k -> Type)) Source Github #

(Traversable p, Traversable q) => Traversable (p :+: q :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

traverse :: forall (p0 :: k +-> k). StrongDistributiveProfunctor p0 => ((p :+: q) :.: p0) :~> (p0 :.: (p :+: q)) Source Github #

(Cartesian k, Traversable p, Traversable q) => Traversable (p :*: q :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

traverse :: forall (p0 :: k +-> k). StrongDistributiveProfunctor p0 => ((p :*: q) :.: p0) :~> (p0 :.: (p :*: q)) Source Github #

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

Defined in Proarrow.Category.Monoidal.Distributive

Methods

traverse :: forall (p0 :: k +-> k). StrongDistributiveProfunctor p0 => ((p :.: q) :.: p0) :~> (p0 :.: (p :.: q)) Source Github #

repTraverse :: forall {k} (t :: k +-> k) p (a :: k) (b :: k). (Traversable t, Representable t, StrongDistributiveProfunctor p) => p a b -> p (t % a) (t % b) Source Github #

With a representable traversable profunctor, you get a traversal a la one-liner.

baseTraverse :: forall {k} (t :: k +-> k) (f :: k +-> k) (a :: k) (b :: k). (Traversable t, Representable t, Representable f, StrongDistributiveProfunctor f, Ob b) => (a ~> (f % b)) -> (t % a) ~> (f % (t % b)) Source Github #

If both profunctors are representable, you get traversals as in base.

class Profunctor t => Cotraversable (t :: k +-> k) where Source Github #

Methods

cotraverse :: forall (p :: k +-> k). (DistributiveProfunctor p, Strong k p, SelfAction k) => (p :.: t) :~> (t :.: p) Source Github #

Instances

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

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p :: k +-> k). (DistributiveProfunctor p, Strong k p, SelfAction k) => (p :.: (Id :: k -> k -> Type)) :~> ((Id :: k -> k -> Type) :.: p) Source Github #

Cotraversable (->) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p :: Type +-> Type). (DistributiveProfunctor p, Strong Type p, SelfAction Type) => (p :.: (->)) :~> ((->) :.: p) Source Github #

Cotraversable p => Cotraversable (Fix p :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Fix

Methods

cotraverse :: forall (p0 :: k +-> k). (DistributiveProfunctor p0, Strong k p0, SelfAction k) => (p0 :.: Fix p) :~> (Fix p :.: p0) Source Github #

(Comonoid r, SelfAction k) => Cotraversable (Reader ('OP r) :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Promonad.Reader

Methods

cotraverse :: forall (p :: k +-> k). (DistributiveProfunctor p, Strong k p, SelfAction k) => (p :.: Reader ('OP r)) :~> (Reader ('OP r) :.: p) Source Github #

(Functor t, Traversable (Star t)) => Cotraversable (Costar t :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.Costar

Methods

cotraverse :: forall (p :: k +-> k). (DistributiveProfunctor p, Strong k p, SelfAction k) => (p :.: Costar t) :~> (Costar t :.: p) Source Github #

SelfAction k => Cotraversable (HaskValue c :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Profunctor.HaskValue

Methods

cotraverse :: forall (p :: k +-> k). (DistributiveProfunctor p, Strong k p, SelfAction k) => (p :.: (HaskValue c :: k -> k -> Type)) :~> ((HaskValue c :: k -> k -> Type) :.: p) Source Github #

(Cotraversable p, Cotraversable q) => Cotraversable (p :+: q :: k -> k -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p0 :: k +-> k). (DistributiveProfunctor p0, Strong k p0, SelfAction k) => (p0 :.: (p :+: q)) :~> ((p :+: q) :.: p0) Source Github #

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

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p0 :: k +-> k). (DistributiveProfunctor p0, Strong k p0, SelfAction k) => (p0 :.: (p :*: q)) :~> ((p :*: q) :.: p0) Source Github #

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

Defined in Proarrow.Category.Monoidal.Distributive

Methods

cotraverse :: forall (p0 :: k +-> k). (DistributiveProfunctor p0, Strong k p0, SelfAction k) => (p0 :.: (p :.: q)) :~> ((p :.: q) :.: p0) Source Github #