Safe Haskell | None |
---|---|
Language | Haskell98 |
- type StateIORef a = StateT (IORef a) IO
- mapIORef :: IORef a -> (a -> b) -> IO b
- get :: StateIORef a a
- gets :: (a -> b) -> StateIORef a b
- getsL :: Lens a b -> StateIORef a b
- put :: a -> StateIORef a ()
- putL :: Lens a b -> b -> StateIORef a ()
- modify :: (a -> a) -> StateIORef a ()
- modifyL :: Lens a b -> (b -> b) -> StateIORef a ()
- getL :: IORef a -> Lens a b -> IO b
- setL :: IORef a -> Lens a b -> b -> IO ()
- modL :: IORef a -> Lens a b -> (b -> b) -> IO ()
Documentation
get :: StateIORef a a Source #
get the value of the IORef inside of the State
gets :: (a -> b) -> StateIORef a b Source #
apply a function on the value of the IORef
getsL :: Lens a b -> StateIORef a b Source #
apply the getter lens on the value of the IORef inside of the State
put :: a -> StateIORef a () Source #
set the value of the IORef inside of the State
putL :: Lens a b -> b -> StateIORef a () Source #
put a value
modify :: (a -> a) -> StateIORef a () Source #
modify the value of the IORef inside of the State with a lens
modifyL :: Lens a b -> (b -> b) -> StateIORef a () Source #
modify the value of the IORef inside of the State with a lens