Library with some useful extensions to the IO monad.
Author: Michael Hanus
Version: January 2017
newIORef
:: a -> IO (IORef a)
Creates a new IORef with an initial value. |
readIORef
:: IORef a -> IO a
Reads the current value of an IORef. |
writeIORef
:: IORef a -> a -> IO ()
Updates the value of an IORef. |
modifyIORef
:: IORef a -> (a -> a) -> IO ()
Modify the value of an IORef. |
Mutable variables containing values of some type. The values are not evaluated when they are assigned to an IORef.
Constructors:
Creates a new IORef with an initial value.
|
Updates the value of an IORef. |
Modify the value of an IORef. |