| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Instance.Cps
Description
A closed symmetric monoidal category with a chosen answer object r is a dialogue category,
with . Dual a = a ~~> rCPS wraps the category to say which object. The morphisms are
those of the category itself, so with r an object of effects, as IO () in Type,
a morphism is pure and a term of is a computation
Up a(a -> IO ()) -> IO (): call by push value, with the effects in the computations only.
CPS r is isomix exactly when r is the unit (answerUnit), and *-autonomous only in
degenerate cases, since (a ~~> r) ~~> r is rarely a.
Documentation
data CPS (r :: k) Source Github #
Constructors
| C k |
Instances
| Monoidal k => Monoidal (CPS r) Source Github # | |||||
Defined in Proarrow.Category.Instance.Cps Associated Types
Methods withOb2 :: forall (a :: CPS r) (b :: CPS r) r0. (Ob a, Ob b) => (Ob (a ** b) => r0) -> r0 Source Github # leftUnitor :: forall (a :: CPS r). Ob a => ((Unit :: CPS r) ** a) ~> a Source Github # leftUnitorInv :: forall (a :: CPS r). Ob a => a ~> ((Unit :: CPS r) ** a) Source Github # rightUnitor :: forall (a :: CPS r). Ob a => (a ** (Unit :: CPS r)) ~> a Source Github # rightUnitorInv :: forall (a :: CPS r). Ob a => a ~> (a ** (Unit :: CPS r)) Source Github # associator :: forall (a :: CPS r) (b :: CPS r) (c :: CPS r). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Github # associatorInv :: forall (a :: CPS r) (b :: CPS r) (c :: CPS r). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Github # | |||||
| SymMonoidal k => SymMonoidal (CPS r) Source Github # | |||||
| Closed k => Closed (CPS r) Source Github # | |||||
Defined in Proarrow.Category.Instance.Cps Methods withObExp :: forall (a :: CPS r) (b :: CPS r) r0. (Ob a, Ob b) => (Ob (a ~~> b) => r0) -> r0 Source Github # curry :: forall (a :: CPS r) (b :: CPS r) (c :: CPS r). (Ob a, Ob b) => ((a ** b) ~> c) -> a ~> (b ~~> c) Source Github # apply :: forall (a :: CPS r) (b :: CPS r). (Ob a, Ob b) => ((a ~~> b) ** a) ~> b Source Github # (^^^) :: forall (a :: CPS r) (b :: CPS r) (x :: CPS r) (y :: CPS r). (b ~> y) -> (x ~> a) -> (a ~~> b) ~> (x ~~> y) Source Github # | |||||
| (Closed k, SymMonoidal k, Ob r) => Dialogue (CPS r) Source Github # | The dual of | ||||
Defined in Proarrow.Category.Instance.Cps Methods withObDual :: forall (a :: CPS r) r0. Ob a => (Ob (Dual a) => r0) -> r0 Source Github # dual :: forall (a :: CPS r) (b :: CPS r). (a ~> b) -> Dual b ~> Dual a Source Github # linDist :: forall (a :: CPS r) (b :: CPS r) (c :: CPS r). (Ob a, Ob b, Ob c) => ((a ** b) ~> Dual c) -> a ~> Dual (b ** c) Source Github # linDistInv :: forall (a :: CPS r) (b :: CPS r) (c :: CPS r). (Ob a, Ob b, Ob c) => (a ~> Dual (b ** c)) -> (a ** b) ~> Dual c Source Github # doubleNegInv :: forall (a :: CPS r). Ob a => a ~> Dual (Dual a) Source Github # | |||||
| (Closed k, SymMonoidal k, r ~ (Unit :: k)) => IsoMix (CPS r) Source Github # | With the unit as the answer object, | ||||
| CategoryOf k => CategoryOf (CPS r) Source Github # | |||||
Defined in Proarrow.Category.Instance.Cps | |||||
| CategoryOf k => Promonad (Cps :: CPS r -> CPS r -> Type) Source Github # | |||||
| Monoidal k => MonoidalProfunctor (Cps :: CPS r -> CPS r -> Type) Source Github # | |||||
| CategoryOf k => Profunctor (Cps :: CPS r -> CPS r -> Type) Source Github # | |||||
Defined in Proarrow.Category.Instance.Cps Methods dimap :: forall (c :: CPS r) (a :: CPS r) (b :: CPS r) (d :: CPS r). (c ~> a) -> (b ~> d) -> Cps a b -> Cps c d Source Github # lmap :: forall (c :: CPS r) (a :: CPS r) (b :: CPS r). (c ~> a) -> Cps a b -> Cps c b Source Github # rmap :: forall (b :: CPS r) (d :: CPS r) (a :: CPS r). (b ~> d) -> Cps a b -> Cps a d Source Github # (\\) :: forall (a :: CPS r) (b :: CPS r) r0. ((Ob a, Ob b) => r0) -> Cps a b -> r0 Source Github # | |||||
| CocommutativeComonoid a => CocommutativeComonoid ('C a :: CPS r) Source Github # | |||||
Defined in Proarrow.Category.Instance.Cps | |||||
| Comonoid a => Comonoid ('C a :: CPS r) Source Github # | |||||
| type Unit Source Github # | |||||
Defined in Proarrow.Category.Instance.Cps | |||||
| type (~>) Source Github # | |||||
| type Dual (a :: CPS r) Source Github # | |||||
| type Ob (a :: CPS r) Source Github # | |||||
| type (a :: CPS r) ** (b :: CPS r) Source Github # | |||||
| type (a :: CPS r) ~~> (b :: CPS r) Source Github # | |||||
data Cps (a :: CPS r) (b :: CPS r) where Source Github #
The arrows of the category, wrapped as a category on the CPS-wrapped kind.
Constructors
| Cps | |
Instances
| CategoryOf k => Promonad (Cps :: CPS r -> CPS r -> Type) Source Github # | |
| Monoidal k => MonoidalProfunctor (Cps :: CPS r -> CPS r -> Type) Source Github # | |
| CategoryOf k => Profunctor (Cps :: CPS r -> CPS r -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.Cps Methods dimap :: forall (c :: CPS r) (a :: CPS r) (b :: CPS r) (d :: CPS r). (c ~> a) -> (b ~> d) -> Cps a b -> Cps c d Source Github # lmap :: forall (c :: CPS r) (a :: CPS r) (b :: CPS r). (c ~> a) -> Cps a b -> Cps c b Source Github # rmap :: forall (b :: CPS r) (d :: CPS r) (a :: CPS r). (b ~> d) -> Cps a b -> Cps a d Source Github # (\\) :: forall (a :: CPS r) (b :: CPS r) r0. ((Ob a, Ob b) => r0) -> Cps a b -> r0 Source Github # | |