| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Instance.DecoratedCospan
Description
Decorated cospans in k: a morphism a is a cospan ~> ba -> x <- b together with a
decoration of its apex, a value of f x. Composition glues along a pushout and joins the two
decorations on the glued apex, using the Alternative structure of f, which takes decorations
on two objects to one on their coproduct. As for Proarrow.Category.Instance.Cospan, the
coproduct of k is the tensor and every object is a Frobenius monoid, so this is a
Hypergraph category.
With labelled boxes as the decoration, a morphism is an open hypergraph: see Proarrow.Category.Instance.OpenHypergraph.
Synopsis
- data DECCOSPAN (f :: k -> Type) = DC k
- data DecCospan (a :: DECCOSPAN f) (b :: DECCOSPAN f) where
- arr :: forall {k} (f :: k -> Type) (a :: k) (b :: k). Alternative f => (a ~> b) -> DecCospan ('DC a :: DECCOSPAN f) ('DC b :: DECCOSPAN f)
- coarr :: forall {k} (f :: k -> Type) (a :: k) (b :: k). Alternative f => (a ~> b) -> DecCospan ('DC b :: DECCOSPAN f) ('DC a :: DECCOSPAN f)
Documentation
data DECCOSPAN (f :: k -> Type) Source Github #
Constructors
| DC k |
Instances
data DecCospan (a :: DECCOSPAN f) (b :: DECCOSPAN f) where Source Github #
Constructors
| DecCospan :: forall {k} {f :: k -> Type} (c :: k) (a1 :: k) (b1 :: k). (a1 ~> c) -> (b1 ~> c) -> f c -> DecCospan ('DC a1 :: DECCOSPAN f) ('DC b1 :: DECCOSPAN f) |
Instances
| (HasPushouts k, Alternative f) => DaggerProfunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # | |
| (HasPushouts k, Alternative f) => Promonad (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # | |
| (HasPushouts k, HasCoproducts k, Alternative f, MonoidalAction t) => Costrong (t :: (DECCOSPAN f, DECCOSPAN f) +-> DECCOSPAN f) (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # | |
| (HasPushouts k, HasCoproducts k, Alternative f) => MonoidalProfunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.DecoratedCospan | |
| (HasPushouts k, Alternative f) => Profunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.DecoratedCospan Methods dimap :: forall (c :: DECCOSPAN f) (a :: DECCOSPAN f) (b :: DECCOSPAN f) (d :: DECCOSPAN f). (c ~> a) -> (b ~> d) -> DecCospan a b -> DecCospan c d Source Github # lmap :: forall (c :: DECCOSPAN f) (a :: DECCOSPAN f) (b :: DECCOSPAN f). (c ~> a) -> DecCospan a b -> DecCospan c b Source Github # rmap :: forall (b :: DECCOSPAN f) (d :: DECCOSPAN f) (a :: DECCOSPAN f). (b ~> d) -> DecCospan a b -> DecCospan a d Source Github # (\\) :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) r. ((Ob a, Ob b) => r) -> DecCospan a b -> r Source Github # | |