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

Safe HaskellNone
LanguageHaskell2010

Data.IORef.Zoom

Documentation

data IORef a where Source

Constructors

IORef :: IORef x -> ALens' x a -> IORef a 

newIORef :: a -> IO (IORef a) Source

zoomIORef :: ALens' a b -> IORef a -> IORef b Source

modifyIORef :: IORef a -> (a -> a) -> IO () Source

modifyIORef' :: IORef a -> (a -> a) -> IO () Source

writeIORef :: IORef a -> a -> IO () Source

atomicModifyIORef :: IORef a -> (a -> (a, b)) -> IO b Source

atomicModifyIORef' :: IORef a -> (a -> (a, b)) -> IO b Source