Control.Comonad.Store.Class

comonad-5: Comonads

Copyright | (C) 2008-2012 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

Control.Comonad.Store.Class

Description

# Documentation

class Comonad w => ComonadStore s w | w -> s where

Minimal complete definition

pos, peek

Methods

pos :: w a -> s

peek :: s -> w a -> a

peeks :: (s -> s) -> w a -> a

seek :: s -> w a -> w a

seeks :: (s -> s) -> w a -> w a

experiment :: Functor f => (s -> f s) -> w a -> f a

Instances

ComonadStore s w => ComonadStore s (IdentityT w) |
(ComonadStore s w, Monoid m) => ComonadStore s (TracedT m w) |
ComonadStore s w => ComonadStore s (EnvT e w) |
Comonad w => ComonadStore s (StoreT s w) |

lowerPos :: (ComonadTrans t, ComonadStore s w) => t w a -> s

lowerPeek :: (ComonadTrans t, ComonadStore s w) => s -> t w a -> a