zoom-refs-0.0.0.1: Zoom (~ Functor) and pairing (~ Applicative) for mutable references.

Safe HaskellNone
LanguageHaskell2010

Data.STRef.Lazy.Zoom

Documentation

data STRef s a where Source

Constructors

Leaf :: STRef s x -> ALens' x a -> STRef s a 
Branch :: STRef s x -> STRef s y -> ALens' (x, y) a -> STRef s a 

zoomSTRef :: ALens' a b -> STRef s a -> STRef s b Source

newSTRef :: a -> ST s (STRef s a) Source

pairSTRefs :: STRef s a -> STRef s b -> STRef s (a, b) Source

readSTRef :: STRef s a -> ST s a Source

modifySTRef :: STRef s a -> (a -> a) -> ST s () Source

writeSTRef :: STRef s a -> a -> ST s () Source