| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Profunctor.Instance.Coyoneda
Contents
Description
The coyoneda construction: pairs a value of Coyoneda pp c d with reindexing arrows, making it
the free profunctor on an arbitrary type of kind j +-> k (the HasFree instance for Profunctor). By
the coyoneda lemma it is equivalent to p when p is already a profunctor (coyoneda/unCoyoneda).
Synopsis
- data Coyoneda (p :: j +-> k) (a :: k) (b :: j) where
- coyoneda :: forall j k (a :: k) (b :: j) p. (CategoryOf j, CategoryOf k, Ob a, Ob b) => p a b -> Coyoneda p a b
- unCoyoneda :: forall {k1} {k} (p :: k1 +-> k). Profunctor p => Coyoneda p :~> p
Documentation
data Coyoneda (p :: j +-> k) (a :: k) (b :: j) where Source Github #
The free profunctor on p (the HasFree instance for Profunctor): a p c d together with
reindexing arrows on both sides. Equivalent to p when p is already a profunctor
(coyoneda/unCoyoneda).
Constructors
| Coyoneda :: forall {k} {j} (a :: k) (c :: k) (d :: j) (b :: j) (p :: j +-> k). (a ~> c) -> (d ~> b) -> p c d -> Coyoneda p a b |
Instances
| (CategoryOf j, CategoryOf k) => Profunctor (Coyoneda p :: k -> j -> Type) Source Github # | |
Defined in Proarrow.Profunctor.Instance.Coyoneda Methods dimap :: forall (c :: k) (a :: k) (b :: j) (d :: j). (c ~> a) -> (b ~> d) -> Coyoneda p a b -> Coyoneda p c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: j). (c ~> a) -> Coyoneda p a b -> Coyoneda p c b Source Github # rmap :: forall (b :: j) (d :: j) (a :: k). (b ~> d) -> Coyoneda p a b -> Coyoneda p a d Source Github # (\\) :: forall (a :: k) (b :: j) r. ((Ob a, Ob b) => r) -> Coyoneda p a b -> r Source Github # | |
| Functor (Coyoneda :: (j +-> k) -> k -> j -> Type) Source Github # | |
| Promonad (Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) :: (j +-> k) -> (k -> j -> Type) -> Type) Source Github # | |
Defined in Proarrow.Profunctor.Instance.Coyoneda Methods id :: forall (a :: j +-> k). Ob a => Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) a a Source Github # (.) :: forall (b :: j +-> k) (c :: j +-> k) (a :: j +-> k). Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) b c -> Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) a b -> Costar (Coyoneda :: (j +-> k) -> k -> j -> Type) a c Source Github # | |
| Promonad (Star (Coyoneda :: (j +-> k) -> k -> j -> Type) :: (k -> j -> Type) -> (j +-> k) -> Type) Source Github # | |
Defined in Proarrow.Profunctor.Instance.Coyoneda Methods id :: forall (a :: k -> j -> Type). Ob a => Star (Coyoneda :: (j +-> k) -> k -> j -> Type) a a Source Github # (.) :: forall (b :: k -> j -> Type) (c :: k -> j -> Type) (a :: k -> j -> Type). Star (Coyoneda :: (j +-> k) -> k -> j -> Type) b c -> Star (Coyoneda :: (j +-> k) -> k -> j -> Type) a b -> Star (Coyoneda :: (j +-> k) -> k -> j -> Type) a c Source Github # | |
coyoneda :: forall j k (a :: k) (b :: j) p. (CategoryOf j, CategoryOf k, Ob a, Ob b) => p a b -> Coyoneda p a b Source Github #
unCoyoneda :: forall {k1} {k} (p :: k1 +-> k). Profunctor p => Coyoneda p :~> p Source Github #
Orphan instances
| HasFree (Profunctor :: (j +-> k) -> Constraint) Source Github # | |
Methods lift :: forall (a :: j +-> k). Ob a => a ~> Free (Profunctor :: (j +-> k) -> Constraint) a Source Github # foldMap :: forall (b :: j +-> k) (a :: j +-> k). Profunctor b => (a ~> b) -> Free (Profunctor :: (j +-> k) -> Constraint) a ~> b Source Github # | |