| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Data.Ref.Linear.Unlifted
Synopsis
- data Ref# a :: UnliftedType
- newRef# :: a %1 -> Linearly %1 -> Ref# a
- freeRef# :: Ref# a %1 -> a
- unsafeReadRef# :: Ref# a %1 -> (# a, Ref# a #)
- unsafeWriteRef# :: Ref# a %1 -> a %1 -> Ref# a
- atomicModify_# :: (a %1 -> a) %1 -> Ref# a %1 -> Ref# a
- atomicModify# :: (a %1 -> (b, a)) %1 -> Ref# a %1 -> (# b, Ref# a #)
Documentation
data Ref# a :: UnliftedType Source #
Instances
| LinearOnly (Ref# a :: UnliftedType) Source # | |
Defined in Data.Ref.Linear.Unlifted Methods linearOnly :: LinearOnlyWitness (Ref# 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 #