profunctors-5.3: Profunctors

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

promap :: Profunctor p => (p :-> q) -> t p :-> t q Source #

Laws:

    promap f . promap g ≡ promap (f . g)
    promap id ≡ id

Instances

ProfunctorFunctor Copastro Source # |
Instance details Defined in Data.Profunctor.Strong Methods promap :: Profunctor p => (p :-> q) -> Copastro p :-> Copastro q Source #
ProfunctorFunctor Cotambara Source # |
Instance details Defined in Data.Profunctor.Strong Methods promap :: Profunctor p => (p :-> q) -> Cotambara p :-> Cotambara q Source #
ProfunctorFunctor Pastro Source # |
Instance details Defined in Data.Profunctor.Strong Methods promap :: Profunctor p => (p :-> q) -> Pastro p :-> Pastro q Source #
ProfunctorFunctor Tambara Source # |
Instance details Defined in Data.Profunctor.Strong Methods promap :: Profunctor p => (p :-> q) -> Tambara p :-> Tambara q Source #
ProfunctorFunctor Environment Source # |
Instance details Defined in Data.Profunctor.Closed Methods promap :: Profunctor p => (p :-> q) -> Environment p :-> Environment q Source #
ProfunctorFunctor Closure Source # |
Instance details Defined in Data.Profunctor.Closed Methods promap :: Profunctor p => (p :-> q) -> Closure p :-> Closure q Source #
ProfunctorFunctor CopastroSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods promap :: Profunctor p => (p :-> q) -> CopastroSum p :-> CopastroSum q Source #
ProfunctorFunctor CotambaraSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods promap :: Profunctor p => (p :-> q) -> CotambaraSum p :-> CotambaraSum q Source #
ProfunctorFunctor PastroSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods promap :: Profunctor p => (p :-> q) -> PastroSum p :-> PastroSum q Source #
ProfunctorFunctor TambaraSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods promap :: Profunctor p => (p :-> q) -> TambaraSum p :-> TambaraSum q Source #
ProfunctorFunctor FreeTraversing Source # |
Instance details Defined in Data.Profunctor.Traversing Methods promap :: Profunctor p => (p :-> q) -> FreeTraversing p :-> FreeTraversing q Source #
ProfunctorFunctor CofreeTraversing Source # |
Instance details Defined in Data.Profunctor.Traversing Methods promap :: Profunctor p => (p :-> q) -> CofreeTraversing p :-> CofreeTraversing q Source #
ProfunctorFunctor FreeMapping Source # |
Instance details Defined in Data.Profunctor.Mapping Methods promap :: Profunctor p => (p :-> q) -> FreeMapping p :-> FreeMapping q Source #
ProfunctorFunctor CofreeMapping Source # |
Instance details Defined in Data.Profunctor.Mapping Methods promap :: Profunctor p => (p :-> q) -> CofreeMapping p :-> CofreeMapping q Source #
ProfunctorFunctor Coyoneda Source # |
Instance details Defined in Data.Profunctor.Yoneda Methods promap :: Profunctor p => (p :-> q) -> Coyoneda p :-> Coyoneda q Source #
ProfunctorFunctor Yoneda Source # |
Instance details Defined in Data.Profunctor.Yoneda Methods promap :: Profunctor p => (p :-> q) -> Yoneda p :-> Yoneda q Source #
ProfunctorFunctor (Rift p) Source # |
Instance details Defined in Data.Profunctor.Composition Methods promap :: Profunctor p0 => (p0 :-> q) -> Rift p p0 :-> Rift p q Source #
ProfunctorFunctor (Procompose p) Source # |
Instance details Defined in Data.Profunctor.Composition Methods promap :: Profunctor p0 => (p0 :-> q) -> Procompose p p0 :-> Procompose p q Source #
ProfunctorFunctor (Ran p) Source # |
Instance details Defined in Data.Profunctor.Ran Methods promap :: Profunctor p0 => (p0 :-> q) -> Ran p p0 :-> Ran p q Source #
Functor f => ProfunctorFunctor (Cayley f) Source # |
Instance details Defined in Data.Profunctor.Cayley Methods promap :: Profunctor p => (p :-> q) -> Cayley f p :-> Cayley f q Source #
ProfunctorFunctor (Sum p) Source # |
Instance details Defined in Data.Profunctor.Monad Methods promap :: Profunctor p0 => (p0 :-> q) -> Sum p p0 :-> Sum p q Source #
ProfunctorFunctor (Product p) Source # |
Instance details Defined in Data.Profunctor.Monad Methods promap :: Profunctor p0 => (p0 :-> q) -> Product p p0 :-> Product p q Source #
Functor f => ProfunctorFunctor (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # |
Instance details Defined in Data.Profunctor.Monad Methods promap :: Profunctor p => (p :-> q) -> Tannen f p :-> Tannen f q Source #

class ProfunctorFunctor t => ProfunctorMonad t where Source #

Laws:

    promap f . proreturn ≡ proreturn . f
    projoin . proreturn ≡ id
    projoin . promap proreturn ≡ id
    projoin . projoin ≡ projoin . promap projoin

Methods

proreturn :: Profunctor p => p :-> t p Source #

projoin :: Profunctor p => t (t p) :-> t p Source #

Instances

ProfunctorMonad Copastro Source # |
Instance details Defined in Data.Profunctor.Strong Methods proreturn :: Profunctor p => p :-> Copastro p Source # projoin :: Profunctor p => Copastro (Copastro p) :-> Copastro p Source #
ProfunctorMonad Pastro Source # |
Instance details Defined in Data.Profunctor.Strong Methods proreturn :: Profunctor p => p :-> Pastro p Source # projoin :: Profunctor p => Pastro (Pastro p) :-> Pastro p Source #
ProfunctorMonad Environment Source # |
Instance details Defined in Data.Profunctor.Closed Methods proreturn :: Profunctor p => p :-> Environment p Source # projoin :: Profunctor p => Environment (Environment p) :-> Environment p Source #
ProfunctorMonad CopastroSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods proreturn :: Profunctor p => p :-> CopastroSum p Source # projoin :: Profunctor p => CopastroSum (CopastroSum p) :-> CopastroSum p Source #
ProfunctorMonad PastroSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods proreturn :: Profunctor p => p :-> PastroSum p Source # projoin :: Profunctor p => PastroSum (PastroSum p) :-> PastroSum p Source #
ProfunctorMonad FreeTraversing Source # |
Instance details Defined in Data.Profunctor.Traversing Methods proreturn :: Profunctor p => p :-> FreeTraversing p Source # projoin :: Profunctor p => FreeTraversing (FreeTraversing p) :-> FreeTraversing p Source #
ProfunctorMonad FreeMapping Source # |
Instance details Defined in Data.Profunctor.Mapping Methods proreturn :: Profunctor p => p :-> FreeMapping p Source # projoin :: Profunctor p => FreeMapping (FreeMapping p) :-> FreeMapping p Source #
ProfunctorMonad Coyoneda Source # |
Instance details Defined in Data.Profunctor.Yoneda Methods proreturn :: Profunctor p => p :-> Coyoneda p Source # projoin :: Profunctor p => Coyoneda (Coyoneda p) :-> Coyoneda p Source #
ProfunctorMonad Yoneda Source # |
Instance details Defined in Data.Profunctor.Yoneda Methods proreturn :: Profunctor p => p :-> Yoneda p Source # projoin :: Profunctor p => Yoneda (Yoneda p) :-> Yoneda p Source #
Category p => ProfunctorMonad (Procompose p) Source # |
Instance details Defined in Data.Profunctor.Composition Methods proreturn :: Profunctor p0 => p0 :-> Procompose p p0 Source # projoin :: Profunctor p0 => Procompose p (Procompose p p0) :-> Procompose p p0 Source #
(Functor f, Monad f) => ProfunctorMonad (Cayley f) Source # | Cayley transforms Monads in `Hask` into monads on `Prof`
Instance details Defined in Data.Profunctor.Cayley Methods proreturn :: Profunctor p => p :-> Cayley f p Source # projoin :: Profunctor p => Cayley f (Cayley f p) :-> Cayley f p Source #
ProfunctorMonad (Sum p) Source # |
Instance details Defined in Data.Profunctor.Monad Methods proreturn :: Profunctor p0 => p0 :-> Sum p p0 Source # projoin :: Profunctor p0 => Sum p (Sum p p0) :-> Sum p p0 Source #
Monad f => ProfunctorMonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # |
Instance details Defined in Data.Profunctor.Monad Methods proreturn :: Profunctor p => p :-> Tannen f p Source # projoin :: Profunctor p => Tannen f (Tannen f p) :-> Tannen f p Source #

class ProfunctorFunctor t => ProfunctorComonad t where Source #

Laws:

    proextract . promap f ≡ f . proextract
    proextract . produplicate ≡ id
    promap proextract . produplicate ≡ id
    produplicate . produplicate ≡ promap produplicate . produplicate

Methods

proextract :: Profunctor p => t p :-> p Source #

produplicate :: Profunctor p => t p :-> t (t p) Source #

Instances

ProfunctorComonad Cotambara Source # |
Instance details Defined in Data.Profunctor.Strong Methods proextract :: Profunctor p => Cotambara p :-> p Source # produplicate :: Profunctor p => Cotambara p :-> Cotambara (Cotambara p) Source #
ProfunctorComonad Tambara Source # |
Instance details Defined in Data.Profunctor.Strong Methods proextract :: Profunctor p => Tambara p :-> p Source # produplicate :: Profunctor p => Tambara p :-> Tambara (Tambara p) Source #
ProfunctorComonad Closure Source # |
Instance details Defined in Data.Profunctor.Closed Methods proextract :: Profunctor p => Closure p :-> p Source # produplicate :: Profunctor p => Closure p :-> Closure (Closure p) Source #
ProfunctorComonad CotambaraSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods proextract :: Profunctor p => CotambaraSum p :-> p Source # produplicate :: Profunctor p => CotambaraSum p :-> CotambaraSum (CotambaraSum p) Source #
ProfunctorComonad TambaraSum Source # |
Instance details Defined in Data.Profunctor.Choice Methods proextract :: Profunctor p => TambaraSum p :-> p Source # produplicate :: Profunctor p => TambaraSum p :-> TambaraSum (TambaraSum p) Source #
ProfunctorComonad CofreeTraversing Source # |
Instance details Defined in Data.Profunctor.Traversing Methods proextract :: Profunctor p => CofreeTraversing p :-> p Source # produplicate :: Profunctor p => CofreeTraversing p :-> CofreeTraversing (CofreeTraversing p) Source #
ProfunctorComonad CofreeMapping Source # |
Instance details Defined in Data.Profunctor.Mapping Methods proextract :: Profunctor p => CofreeMapping p :-> p Source # produplicate :: Profunctor p => CofreeMapping p :-> CofreeMapping (CofreeMapping p) Source #
ProfunctorComonad Coyoneda Source # |
Instance details Defined in Data.Profunctor.Yoneda Methods proextract :: Profunctor p => Coyoneda p :-> p Source # produplicate :: Profunctor p => Coyoneda p :-> Coyoneda (Coyoneda p) Source #
ProfunctorComonad Yoneda Source # |
Instance details Defined in Data.Profunctor.Yoneda Methods proextract :: Profunctor p => Yoneda p :-> p Source # produplicate :: Profunctor p => Yoneda p :-> Yoneda (Yoneda p) Source #
Category p => ProfunctorComonad (Rift p) Source # |
Instance details Defined in Data.Profunctor.Composition Methods proextract :: Profunctor p0 => Rift p p0 :-> p0 Source # produplicate :: Profunctor p0 => Rift p p0 :-> Rift p (Rift p p0) Source #
Category p => ProfunctorComonad (Ran p) Source # |
Instance details Defined in Data.Profunctor.Ran Methods proextract :: Profunctor p0 => Ran p p0 :-> p0 Source # produplicate :: Profunctor p0 => Ran p p0 :-> Ran p (Ran p p0) Source #
Comonad f => ProfunctorComonad (Cayley f) Source # | Cayley transforms Comonads in `Hask` into comonads on `Prof`
Instance details Defined in Data.Profunctor.Cayley Methods proextract :: Profunctor p => Cayley f p :-> p Source # produplicate :: Profunctor p => Cayley f p :-> Cayley f (Cayley f p) Source #
ProfunctorComonad (Product p) Source # |
Instance details Defined in Data.Profunctor.Monad Methods proextract :: Profunctor p0 => Product p p0 :-> p0 Source # produplicate :: Profunctor p0 => Product p p0 :-> Product p (Product p p0) Source #
Comonad f => ProfunctorComonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) Source # |
Instance details Defined in Data.Profunctor.Monad Methods proextract :: Profunctor p => Tannen f p :-> p Source # produplicate :: Profunctor p => Tannen f p :-> Tannen f (Tannen f p) Source #