module Control.Concurrent.Classy.CRef {-# DEPRECATED "Import Control.Concurrent.Classy.IORef instead" #-}
(
CRef
, newCRef
, newCRefN
, readCRef
, writeCRef
, modifyCRef
, modifyCRef'
, atomicModifyCRef
, atomicModifyCRef'
, atomicWriteCRef
, casCRef
, modifyCRefCAS
, modifyCRefCAS_
) where
import qualified Control.Concurrent.Classy.IORef as IORef
import Control.Monad.Conc.Class (IORef, MonadConc, Ticket)
import qualified Control.Monad.Conc.Class as IORef
type CRef m a = IORef m a
{-# DEPRECATED CRef "Use IORef instead" #-}
newCRef :: MonadConc m => a -> m (CRef m a)
newCRef :: forall (m :: * -> *) a. MonadConc m => a -> m (CRef m a)
newCRef = forall (m :: * -> *) a. MonadConc m => a -> m (IORef m a)
IORef.newIORef
{-# DEPRECATED newCRef "Use newIORef instead" #-}
newCRefN :: MonadConc m => String -> a -> m (CRef m a)
newCRefN :: forall (m :: * -> *) a. MonadConc m => String -> a -> m (CRef m a)
newCRefN = forall (m :: * -> *) a. MonadConc m => String -> a -> m (IORef m a)
IORef.newIORefN
{-# DEPRECATED newCRefN "Use newIORefN instead" #-}
readCRef :: MonadConc m => CRef m a -> m a
readCRef :: forall (m :: * -> *) a. MonadConc m => CRef m a -> m a
readCRef = forall (m :: * -> *) a. MonadConc m => IORef m a -> m a
IORef.readIORef
{-# DEPRECATED readCRef "Use readIORef instead" #-}
writeCRef :: MonadConc m => CRef m a -> a -> m ()
writeCRef :: forall (m :: * -> *) a. MonadConc m => CRef m a -> a -> m ()
writeCRef = forall (m :: * -> *) a. MonadConc m => IORef m a -> a -> m ()
IORef.writeIORef
{-# DEPRECATED writeCRef "Use writeIORef instead" #-}
modifyCRef :: MonadConc m => CRef m a -> (a -> a) -> m ()
modifyCRef :: forall (m :: * -> *) a. MonadConc m => CRef m a -> (a -> a) -> m ()
modifyCRef = forall (m :: * -> *) a. MonadConc m => CRef m a -> (a -> a) -> m ()
IORef.modifyIORef
{-# DEPRECATED modifyCRef "Use modifyIORef instead" #-}
modifyCRef' :: MonadConc m => CRef m a -> (a -> a) -> m ()
modifyCRef' :: forall (m :: * -> *) a. MonadConc m => CRef m a -> (a -> a) -> m ()
modifyCRef' = forall (m :: * -> *) a. MonadConc m => CRef m a -> (a -> a) -> m ()
IORef.modifyIORef'
{-# DEPRECATED modifyCRef' "Use modifyIORef' instead" #-}
atomicModifyCRef :: MonadConc m => CRef m a -> (a -> (a, b)) -> m b
atomicModifyCRef :: forall (m :: * -> *) a b.
MonadConc m =>
CRef m a -> (a -> (a, b)) -> m b
atomicModifyCRef = forall (m :: * -> *) a b.
MonadConc m =>
IORef m a -> (a -> (a, b)) -> m b
IORef.atomicModifyIORef
{-# DEPRECATED atomicModifyCRef "Use atomicModifyIORef instead" #-}
atomicModifyCRef' :: MonadConc m => CRef m a -> (a -> (a,b)) -> m b
atomicModifyCRef' :: forall (m :: * -> *) a b.
MonadConc m =>
CRef m a -> (a -> (a, b)) -> m b
atomicModifyCRef' = forall (m :: * -> *) a b.
MonadConc m =>
CRef m a -> (a -> (a, b)) -> m b
IORef.atomicModifyIORef'
{-# DEPRECATED atomicModifyCRef' "Use atomicModifyIORef' instead" #-}
atomicWriteCRef :: MonadConc m => CRef m a -> a -> m ()
atomicWriteCRef :: forall (m :: * -> *) a. MonadConc m => CRef m a -> a -> m ()
atomicWriteCRef = forall (m :: * -> *) a. MonadConc m => IORef m a -> a -> m ()
IORef.atomicWriteIORef
{-# DEPRECATED atomicWriteCRef "Use atomicWriteIORef instead" #-}
casCRef :: MonadConc m => CRef m a -> Ticket m a -> a -> m (Bool, Ticket m a)
casCRef :: forall (m :: * -> *) a.
MonadConc m =>
CRef m a -> Ticket m a -> a -> m (Bool, Ticket m a)
casCRef = forall (m :: * -> *) a.
MonadConc m =>
IORef m a -> Ticket m a -> a -> m (Bool, Ticket m a)
IORef.casIORef
{-# DEPRECATED casCRef "Use casIORef instead" #-}
modifyCRefCAS :: MonadConc m => CRef m a -> (a -> (a, b)) -> m b
modifyCRefCAS :: forall (m :: * -> *) a b.
MonadConc m =>
CRef m a -> (a -> (a, b)) -> m b
modifyCRefCAS = forall (m :: * -> *) a b.
MonadConc m =>
IORef m a -> (a -> (a, b)) -> m b
IORef.modifyIORefCAS
{-# DEPRECATED modifyCRefCAS "Use modifyIORefCAS instead" #-}
modifyCRefCAS_ :: MonadConc m => CRef m a -> (a -> a) -> m ()
modifyCRefCAS_ :: forall (m :: * -> *) a. MonadConc m => CRef m a -> (a -> a) -> m ()
modifyCRefCAS_ = forall (m :: * -> *) a.
MonadConc m =>
IORef m a -> (a -> a) -> m ()
IORef.modifyIORefCAS_
{-# DEPRECATED modifyCRefCAS_ "Use modifyIORefCAS_ instead" #-}