comonad-5: Comonads

Copyright(C) 2008-2014 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable (fundeps, MPTCs)
Safe HaskellSafe
LanguageHaskell2010

Control.Comonad.Store

Contents

Description

 

Synopsis

ComonadStore class

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

Minimal complete definition

pos, peek

Methods

pos :: w a -> s Source

peek :: s -> w a -> a Source

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

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

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

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

The Store comonad

store :: (s -> a) -> s -> Store s a Source

Create a Store using an accessor function and a stored value

runStore :: Store s a -> (s -> a, s) Source

The StoreT comonad transformer

runStoreT :: StoreT s w a -> (w (s -> a), s) Source

Re-exported modules