lifted-base-tf-0.1.0.0: lifted IO operations from the base library

CopyrightLiyang HU Bas van Dijk
LicenseBSD-style
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.IORef.Lifted

Description

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

Synopsis

Documentation

data IORef a #

A mutable variable in the IO monad

Instances
Eq (IORef a)

Pointer equality.

Since: base-4.1.0.0

Instance details

Defined in GHC.IORef

Methods

(==) :: IORef a -> IORef a -> Bool #

(/=) :: IORef a -> IORef a -> Bool #

newIORef :: (Basic1 m, Base m ~ IO) => a -> m (IORef a) Source #

Generalized version of newIORef.

readIORef :: (Basic1 m, Base m ~ IO) => IORef a -> m a Source #

Generalized version of readIORef.

writeIORef :: (Basic1 m, Base m ~ IO) => IORef a -> a -> m () Source #

Generalized version of writeIORef.

modifyIORef :: (Basic1 m, Base m ~ IO) => IORef a -> (a -> a) -> m () Source #

Generalized version of modifyIORef.

modifyIORef' :: (Basic1 m, Base m ~ IO) => IORef a -> (a -> a) -> m () Source #

Generalized version of modifyIORef'.

atomicModifyIORef :: (Basic1 m, Base m ~ IO) => IORef a -> (a -> (a, b)) -> m b Source #

Generalized version of atomicModifyIORef.

atomicModifyIORef' :: (Basic1 m, Base m ~ IO) => IORef a -> (a -> (a, b)) -> m b Source #

Generalized version of atomicModifyIORef'.

atomicWriteIORef :: (Basic1 m, Base m ~ IO) => IORef a -> a -> m () Source #

Generalized version of atomicWriteIORef.

mkWeakIORef :: (MonadBaseControl m, Base m ~ IO) => 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.