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