| 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 #
ProfunctorFunctor has a polymorphic kind since 5.6.
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
| ProfunctorMonad CopastroSum Source # | |
Defined in Data.Profunctor.Choice Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> CopastroSum p Source # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => CopastroSum (CopastroSum p) :-> CopastroSum p Source # | |
| ProfunctorMonad PastroSum Source # | |
Defined in Data.Profunctor.Choice | |
| ProfunctorMonad Environment Source # | |
Defined in Data.Profunctor.Closed Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Environment p Source # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Environment p) :-> Environment p Source # | |
| ProfunctorMonad FreeMapping Source # | |
Defined in Data.Profunctor.Mapping Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> FreeMapping p Source # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => FreeMapping (FreeMapping p) :-> FreeMapping p Source # | |
| ProfunctorMonad Copastro Source # | |
Defined in Data.Profunctor.Strong | |
| ProfunctorMonad Pastro Source # | |
Defined in Data.Profunctor.Strong | |
| ProfunctorMonad FreeTraversing Source # | |
Defined in Data.Profunctor.Traversing Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> FreeTraversing p Source # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => FreeTraversing (FreeTraversing p) :-> FreeTraversing p Source # | |
| ProfunctorMonad Coyoneda Source # | |
Defined in Data.Profunctor.Yoneda | |
| ProfunctorMonad Yoneda Source # | |
Defined in Data.Profunctor.Yoneda | |
| ProfunctorMonad (Sum p) Source # | |
Defined in Data.Profunctor.Monad Methods proreturn :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Sum p p0 Source # projoin :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Sum p (Sum p p0) :-> Sum p p0 Source # | |
| Monad f => ProfunctorMonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Profunctor.Monad Methods proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Tannen f p Source # projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f (Tannen f p) :-> Tannen f p Source # | |
| (Functor f, Monad f) => ProfunctorMonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | Cayley transforms Monads in |
Defined in Data.Profunctor.Cayley | |
| Category p => ProfunctorMonad (Procompose p :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # | |
Defined in Data.Profunctor.Composition Methods proreturn :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Procompose p p0 Source # projoin :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Procompose p (Procompose p p0) :-> Procompose p p0 Source # | |
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 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 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 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 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 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 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 # | |
| 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 # | |
| Comonad f => ProfunctorComonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) 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 # | |
| Category p => ProfunctorComonad (Rift p :: (Type -> Type -> Type) -> Type -> Type -> Type) 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 :: (Type -> Type -> Type) -> Type -> Type -> Type) 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 # | |