comonads-fd-1.0.0: Comonad transformers using functional dependencies.

Portabilitynon-portable (fundeps, MPTCs)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Comonad.Store.Strict

Contents

Description

 

Synopsis

ComonadStore class

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

Methods

get :: w a -> sSource

put :: s -> w a -> aSource

modify :: (s -> s) -> w a -> aSource

gets :: ComonadStore s w => (s -> t) -> w a -> tSource

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

The Store comonad

type Store s = StoreT s Identity

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

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

The StoreT comonad transformer

data StoreT s w a

Constructors

StoreT (w (s -> a)) s 

Instances

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

Re-exported modules