pure-borrow
Safe HaskellNone
LanguageGHC2021

Data.Ref.Linear.Unlifted

Synopsis

Documentation

data Ref# a :: UnliftedType Source #

Instances

Instances details
LinearOnly (Ref# a :: UnliftedType) Source # 
Instance details

Defined in Data.Ref.Linear.Unlifted

newRef# :: a %1 -> Linearly %1 -> Ref# a Source #

freeRef# :: Ref# a %1 -> a Source #

unsafeReadRef# :: Ref# a %1 -> (# a, Ref# a #) Source #

This is unsafe, because the ownership of a is duplicated.

unsafeWriteRef# :: Ref# a %1 -> a %1 -> Ref# a Source #

This is unsafe, because the ownership of original a is dropped.

atomicModify_# :: (a %1 -> a) %1 -> Ref# a %1 -> Ref# a Source #

atomicModify# :: (a %1 -> (b, a)) %1 -> Ref# a %1 -> (# b, Ref# a #) Source #