effectful
Safe HaskellSafe-Inferred
LanguageGHC2021

Effectful.Prim.IORef.Strict

Description

Lifted Data.IORef.Strict.

Since: 2.4.0.0

Synopsis

Effect

data Prim (a :: Type -> Type) b #

Instances

Instances details
type DispatchOf Prim 
Instance details

Defined in Effectful.Internal.Monad

type DispatchOf Prim = 'Static 'WithSideEffects
data StaticRep Prim 
Instance details

Defined in Effectful.Internal.Monad

data StaticRep Prim = Prim

Handlers

runPrim :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Eff (Prim ': es) a -> Eff es a #

IORef

data IORef a #

Instances

Instances details
NFData1 IORef 
Instance details

Defined in Data.IORef.Strict

Methods

liftRnf :: (a -> ()) -> IORef a -> () #

NFData (IORef a) 
Instance details

Defined in Data.IORef.Strict

Methods

rnf :: IORef a -> () #

Eq (IORef a) 
Instance details

Defined in Data.IORef.Strict

Methods

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

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

newIORef :: Prim :> es => a -> Eff es (IORef a) Source #

Lifted newIORef.

readIORef :: Prim :> es => IORef a -> Eff es a Source #

Lifted readIORef.

writeIORef :: Prim :> es => IORef a -> a -> Eff es () Source #

Lifted writeIORef.

modifyIORef :: Prim :> es => IORef a -> (a -> a) -> Eff es () Source #

Lifted modifyIORef.

atomicModifyIORef :: Prim :> es => IORef a -> (a -> (a, b)) -> Eff es b Source #

Lifted atomicModifyIORef.

atomicWriteIORef :: Prim :> es => IORef a -> a -> Eff es () Source #

Lifted atomicWriteIORef.

mkWeakIORef :: (HasCallStack, Prim :> es) => IORef a -> Eff es () -> Eff es (Weak (IORef a)) Source #

Lifted mkWeakIORef.

Note: the finalizer will run a cloned environment, so any changes it makes to thread local data will not be visible outside of it.