lifted-base-0.1.2: lifted IO operations from the base library

MaintainerBas van Dijk <>
Safe HaskellTrustworthy



This is a wrapped version of Data.IORef with types generalised from IO to all monads in MonadBase.



data IORef a

A mutable variable in the IO monad


newIORef :: MonadBase IO m => a -> m (IORef a)Source

Generalized version of newIORef.

readIORef :: MonadBase IO m => IORef a -> m aSource

Generalized version of readIORef.

writeIORef :: MonadBase IO m => IORef a -> a -> m ()Source

Generalized version of writeIORef.

modifyIORef :: MonadBase IO m => IORef a -> (a -> a) -> m ()Source

Generalized version of modifyIORef.

atomicModifyIORef :: MonadBase IO m => IORef a -> (a -> (a, b)) -> m bSource

Generalized version of atomicModifyIORef.

mkWeakIORef :: MonadBaseControl IO m => IORef a -> m () -> m (Weak (IORef a))Source

Generalized version of mkWeakIORef.

Note any monadic side effects in m of the "finalizer" computation are discarded.