| Copyright | (C) 2014-2015 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Profunctor.Monad
Description
Synopsis
- class ProfunctorFunctor t where
- promap :: Profunctor p => (p :-> q) -> t p :-> t q
- class ProfunctorFunctor t => ProfunctorMonad t where
- proreturn :: Profunctor p => p :-> t p
- projoin :: Profunctor p => t (t p) :-> t p
- class ProfunctorFunctor t => ProfunctorComonad t where
- proextract :: Profunctor p => t p :-> p
- produplicate :: Profunctor p => t p :-> t (t p)
Documentation
class ProfunctorFunctor t where Source #
Methods
Instances
class ProfunctorFunctor t => ProfunctorMonad t where Source #
Laws:
promapf.proreturn≡proreturn.fprojoin.proreturn≡idprojoin.promapproreturn≡idprojoin.projoin≡projoin.promapprojoin
Methods
proreturn :: Profunctor p => p :-> t p Source #
projoin :: Profunctor p => t (t p) :-> t p Source #
Instances
class ProfunctorFunctor t => ProfunctorComonad t where Source #
Laws:
proextract.promapf ≡ f.proextractproextract.produplicate≡idpromapproextract.produplicate≡idproduplicate.produplicate≡promapproduplicate.produplicate
Methods
proextract :: Profunctor p => t p :-> p Source #
produplicate :: Profunctor p => t p :-> t (t p) Source #
Instances
| ProfunctorComonad Cotambara Source # | |
Defined in Data.Profunctor.Strong Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> Cotambara (Cotambara p) Source # | |
| ProfunctorComonad Tambara Source # | |
Defined in Data.Profunctor.Strong Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> Tambara (Tambara p) Source # | |
| ProfunctorComonad Closure Source # | |
Defined in Data.Profunctor.Closed Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> Closure (Closure p) Source # | |
| ProfunctorComonad CotambaraSum Source # | |
Defined in Data.Profunctor.Choice Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> CotambaraSum (CotambaraSum p) Source # | |
| ProfunctorComonad TambaraSum Source # | |
Defined in Data.Profunctor.Choice Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> TambaraSum (TambaraSum p) Source # | |
| ProfunctorComonad CofreeTraversing Source # | |
Defined in Data.Profunctor.Traversing Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeTraversing p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeTraversing p :-> CofreeTraversing (CofreeTraversing p) Source # | |
| ProfunctorComonad CofreeMapping Source # | |
Defined in Data.Profunctor.Mapping Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> CofreeMapping (CofreeMapping p) Source # | |
| ProfunctorComonad Coyoneda Source # | |
Defined in Data.Profunctor.Yoneda Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> Coyoneda (Coyoneda p) Source # | |
| ProfunctorComonad Yoneda Source # | |
Defined in Data.Profunctor.Yoneda Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> Yoneda (Yoneda p) Source # | |
| Category p => ProfunctorComonad (Rift p) Source # | |
Defined in Data.Profunctor.Composition Methods proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> p0 Source # produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> Rift p (Rift p p0) Source # | |
| Category p => ProfunctorComonad (Ran p) Source # | |
Defined in Data.Profunctor.Ran Methods proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> p0 Source # produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> Ran p (Ran p p0) Source # | |
| Comonad f => ProfunctorComonad (Cayley f) Source # | Cayley transforms Comonads in |
Defined in Data.Profunctor.Cayley Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> Cayley f (Cayley f p) Source # | |
| ProfunctorComonad (Product p) Source # | |
Defined in Data.Profunctor.Monad Methods proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Product p p0 :-> p0 Source # produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Product p p0 :-> Product p (Product p p0) Source # | |
| Comonad f => ProfunctorComonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Profunctor.Monad Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f p :-> p Source # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f p :-> Tannen f (Tannen f p) Source # | |