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 #
ProfunctorFunctor
has a polymorphic kind since 5.6
.
Methods
promap :: Profunctor p => (p :-> q) -> t p :-> t q #
Instances
ProfunctorFunctor CopastroSum # | |
Defined in Data.Profunctor.Choice Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CopastroSum p :-> CopastroSum q # | |
ProfunctorFunctor CotambaraSum # | |
Defined in Data.Profunctor.Choice Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CotambaraSum p :-> CotambaraSum q # | |
ProfunctorFunctor PastroSum # | |
Defined in Data.Profunctor.Choice | |
ProfunctorFunctor TambaraSum # | |
Defined in Data.Profunctor.Choice Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> TambaraSum p :-> TambaraSum q # | |
ProfunctorFunctor Closure # | |
Defined in Data.Profunctor.Closed | |
ProfunctorFunctor Environment # | |
Defined in Data.Profunctor.Closed Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Environment p :-> Environment q # | |
ProfunctorFunctor CofreeMapping # | |
Defined in Data.Profunctor.Mapping Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CofreeMapping p :-> CofreeMapping q # | |
ProfunctorFunctor FreeMapping # | |
Defined in Data.Profunctor.Mapping Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> FreeMapping p :-> FreeMapping q # | |
ProfunctorFunctor Copastro # | |
Defined in Data.Profunctor.Strong | |
ProfunctorFunctor Cotambara # | |
Defined in Data.Profunctor.Strong | |
ProfunctorFunctor Pastro # | |
Defined in Data.Profunctor.Strong | |
ProfunctorFunctor Tambara # | |
Defined in Data.Profunctor.Strong | |
ProfunctorFunctor CofreeTraversing # | |
Defined in Data.Profunctor.Traversing Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CofreeTraversing p :-> CofreeTraversing q # | |
ProfunctorFunctor FreeTraversing # | |
Defined in Data.Profunctor.Traversing Methods promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> FreeTraversing p :-> FreeTraversing q # | |
ProfunctorFunctor Coyoneda # | |
Defined in Data.Profunctor.Yoneda | |
ProfunctorFunctor Yoneda # | |
Defined in Data.Profunctor.Yoneda | |
ProfunctorFunctor (Product p :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Monad | |
ProfunctorFunctor (Sum p :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Monad | |
Functor f => ProfunctorFunctor (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Monad | |
Functor f => ProfunctorFunctor (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Cayley | |
ProfunctorFunctor (Procompose p :: (Type -> Type -> Type) -> Type -> k1 -> Type) # | |
Defined in Data.Profunctor.Composition Methods promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Procompose p p0 :-> Procompose p q # | |
ProfunctorFunctor (Rift p :: (Type -> Type -> Type) -> Type -> k1 -> Type) # | |
Defined in Data.Profunctor.Composition | |
ProfunctorFunctor (Ran p :: (Type -> Type -> Type) -> k -> Type -> Type) # | |
Defined in Data.Profunctor.Ran |
class ProfunctorFunctor t => ProfunctorMonad t where #
Laws:
promap
f.
proreturn
≡proreturn
.
fprojoin
.
proreturn
≡id
projoin
.
promap
proreturn
≡id
projoin
.
projoin
≡projoin
.
promap
projoin
Instances
class ProfunctorFunctor t => ProfunctorComonad t where #
Laws:
proextract
.
promap
f ≡ f.
proextract
proextract
.
produplicate
≡id
promap
proextract
.
produplicate
≡id
produplicate
.
produplicate
≡promap
produplicate
.
produplicate
Instances
ProfunctorComonad CotambaraSum # | |
Defined in Data.Profunctor.Choice Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> CotambaraSum (CotambaraSum p) # | |
ProfunctorComonad TambaraSum # | |
Defined in Data.Profunctor.Choice Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> TambaraSum (TambaraSum p) # | |
ProfunctorComonad Closure # | |
Defined in Data.Profunctor.Closed Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> Closure (Closure p) # | |
ProfunctorComonad CofreeMapping # | |
Defined in Data.Profunctor.Mapping Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> CofreeMapping (CofreeMapping p) # | |
ProfunctorComonad Cotambara # | |
Defined in Data.Profunctor.Strong Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> Cotambara (Cotambara p) # | |
ProfunctorComonad Tambara # | |
Defined in Data.Profunctor.Strong Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> Tambara (Tambara p) # | |
ProfunctorComonad CofreeTraversing # | |
Defined in Data.Profunctor.Traversing Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeTraversing p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeTraversing p :-> CofreeTraversing (CofreeTraversing p) # | |
ProfunctorComonad Coyoneda # | |
Defined in Data.Profunctor.Yoneda Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> Coyoneda (Coyoneda p) # | |
ProfunctorComonad Yoneda # | |
Defined in Data.Profunctor.Yoneda Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> Yoneda (Yoneda p) # | |
ProfunctorComonad (Product p) # | |
Defined in Data.Profunctor.Monad Methods proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Product p p0 :-> p0 # produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Product p p0 :-> Product p (Product p p0) # | |
Comonad f => ProfunctorComonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Monad Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f p :-> Tannen f (Tannen f p) # | |
Comonad f => ProfunctorComonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) # | Cayley transforms Comonads in |
Defined in Data.Profunctor.Cayley Methods proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> p # produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> Cayley f (Cayley f p) # | |
Category p => ProfunctorComonad (Rift p :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Composition Methods proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> p0 # produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> Rift p (Rift p p0) # | |
Category p => ProfunctorComonad (Ran p :: (Type -> Type -> Type) -> Type -> Type -> Type) # | |
Defined in Data.Profunctor.Ran Methods proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> p0 # produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> Ran p (Ran p p0) # |