Copyright | (C) 2008-2014 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable (fundeps, MPTCs) |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- class Comonad w => ComonadStore s w | w -> s where
- type Store s = StoreT s Identity
- store :: (s -> a) -> s -> Store s a
- runStore :: Store s a -> (s -> a, s)
- data StoreT s w a = StoreT (w (s -> a)) s
- runStoreT :: StoreT s w a -> (w (s -> a), s)
- module Control.Comonad
- module Control.Comonad.Trans.Class
ComonadStore class
class Comonad w => ComonadStore s w | w -> s where #
peeks :: (s -> s) -> w a -> a #
seeks :: (s -> s) -> w a -> w a #
experiment :: Functor f => (s -> f s) -> w a -> f a #
Instances
(ComonadStore s w, Monoid m) => ComonadStore s (TracedT m w) # | |
Defined in Control.Comonad.Store.Class | |
ComonadStore s w => ComonadStore s (EnvT e w) # | |
ComonadStore s w => ComonadStore s (IdentityT w) # | |
Defined in Control.Comonad.Store.Class | |
Comonad w => ComonadStore s (StoreT s w) # | |
The Store comonad
The StoreT comonad transformer
StoreT (w (s -> a)) s |
Instances
ComonadTraced m w => ComonadTraced m (StoreT s w) # | |
Defined in Control.Comonad.Traced.Class | |
Comonad w => ComonadStore s (StoreT s w) # | |
ComonadEnv e w => ComonadEnv e (StoreT t w) # | |
Defined in Control.Comonad.Env.Class | |
ComonadHoist (StoreT s) # | |
ComonadTrans (StoreT s) # | |
Defined in Control.Comonad.Trans.Store | |
Functor w => Functor (StoreT s w) # | |
(Applicative w, Monoid s) => Applicative (StoreT s w) # | |
Defined in Control.Comonad.Trans.Store | |
(ComonadApply w, Semigroup s) => ComonadApply (StoreT s w) # | |
Comonad w => Comonad (StoreT s w) # | |
Re-exported modules
module Control.Comonad
module Control.Comonad.Trans.Class