 | category-extras-0.53.6: Various modules and constructs inspired by category theory | Contents | Index |
|
Control.Comonad.Reader | Portability | portable | Stability | experimental | Maintainer | Edward Kmett <ekmett@gmail.com> |
|
|
|
Description |
If you look at the reader arrow:
(e, a) -> a you can see that all the interesting bits are bunched
on the left. This is that comonad. Flipping the pair and currying the
arguments yields a -> (e -> a), and you can recognize the (e -> a) as
the reader monad. In more technical language the Reader comonad is
left adjoint to the Reader monad.
|
|
|
Documentation |
|
data Coreader r a |
Constructors | | Instances | |
|
|
runCoreader :: Coreader r a -> (r, a) |
|
newtype CoreaderT w r a |
Constructors | | Instances | |
|
|
class Comonad w => ComonadReader r w | w -> r where |
| Methods | | | Instances | |
|
|
Produced by Haddock version 2.1.0 |