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 |
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
.
promap :: Profunctor p => (p :-> q) -> t p :-> t q #
Instances
class ProfunctorFunctor t => ProfunctorMonad t where #
Laws:
promap
f.
proreturn
≡proreturn
.
fprojoin
.
proreturn
≡id
projoin
.
promap
proreturn
≡id
projoin
.
projoin
≡projoin
.
promap
projoin
proreturn :: Profunctor p => p :-> t p #
projoin :: Profunctor p => t (t p) :-> t p #
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
proextract :: Profunctor p => t p :-> p #
produplicate :: Profunctor p => t p :-> t (t p) #