module LIO.LIORef.Trans (
newLIORef
, newLIORefP
, readLIORef
, readLIORefP
, writeLIORef
, writeLIORefP
, modifyLIORef
, modifyLIORefP
, atomicModifyLIORef
, atomicModifyLIORefP
) where
import safe LIO.Core
import safe LIO.Label
import safe LIO.LIORef (LIORef)
import safe qualified LIO.LIORef as R
newLIORef :: (MonadLIO l m, Label l)
=> l
-> a
-> m (LIORef l a)
newLIORef l = liftLIO . R.newLIORef l
newLIORefP :: (MonadLIO l m, PrivDesc l p) => Priv p -> l -> a -> m (LIORef l a)
newLIORefP p l = liftLIO . R.newLIORefP p l
readLIORef :: (MonadLIO l m, Label l) => LIORef l a -> m a
readLIORef = liftLIO . R.readLIORef
readLIORefP :: (MonadLIO l m, PrivDesc l p) => Priv p -> LIORef l a -> m a
readLIORefP priv = liftLIO . R.readLIORefP priv
writeLIORef :: (MonadLIO l m, Label l) => LIORef l a -> a -> m ()
writeLIORef ref = liftLIO . R.writeLIORef ref
writeLIORefP :: (MonadLIO l m, PrivDesc l p) => Priv p -> LIORef l a -> a -> m ()
writeLIORefP priv ref = liftLIO . R.writeLIORefP priv ref
modifyLIORef :: (MonadLIO l m, Label l)
=> LIORef l a
-> (a -> a)
-> m ()
modifyLIORef ref = liftLIO . R.modifyLIORef ref
modifyLIORefP :: (MonadLIO l m, PrivDesc l p)
=> Priv p -> LIORef l a -> (a -> a) -> m ()
modifyLIORefP priv ref = liftLIO . R.modifyLIORefP priv ref
atomicModifyLIORef :: (MonadLIO l m, Label l) => LIORef l a -> (a -> (a, b)) -> m b
atomicModifyLIORef ref = liftLIO . R.atomicModifyLIORef ref
atomicModifyLIORefP :: (MonadLIO l m, PrivDesc l p)
=> Priv p -> LIORef l a -> (a -> (a, b)) -> m b
atomicModifyLIORefP priv ref = liftLIO . R.atomicModifyLIORefP priv ref