| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Profunctor.Instance.Constant
Description
The constant functor as a FunctorForRep, sending every object to c. Its
representable profunctor Rep (Constant c) is the viewing carrier used by view.
Documentation
data family Constant :: k -> j +-> k Source Github #
Instances
| (CopyDiscard k, Ob r) => Strong (Tensor :: k -> (k, k) -> Type) (Rep (Constant r) :: k -> k -> Type) Source Github # | The constant functor ignores the acting object: discard it. Only copying/discarding is needed, so this works in biproduct categories as well as cartesian ones. |
| (Monoidal k, Comonoid r) => MonoidalProfunctor (Corep (Constant r) :: k -> k -> Type) Source Github # | |
| (Monoidal k, Monoid r) => MonoidalProfunctor (Rep (Constant r) :: k -> k -> Type) Source Github # | |
| (CategoryOf j, CategoryOf k, Ob c) => FunctorForRep (Constant c :: j +-> k) 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. |
| (HasCoproducts k, Ob r) => MonoidalProfunctor (Coprod (Rep (Constant r)) :: COPROD k -> COPROD k -> Type) Source Github # | |
Defined in Proarrow.Monoid Methods one :: Coprod (Rep (Constant r)) (Unit :: COPROD k) (Unit :: COPROD k) Source Github # (**) :: forall (x1 :: COPROD k) (x2 :: COPROD k) (y1 :: COPROD k) (y2 :: COPROD k). Coprod (Rep (Constant r)) x1 x2 -> Coprod (Rep (Constant r)) y1 y2 -> Coprod (Rep (Constant r)) (x1 ** y1) (x2 ** y2) Source Github # | |
| type (Constant c :: j +-> k) @ (a :: j) Source Github # | |
Defined in Proarrow.Profunctor.Instance.Constant | |