| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Data.Ref.Linear
Synopsis
- data Ref a
- new :: a %1 -> Linearly %1 -> Ref a
- free :: Ref a %1 -> a
- unsafeReadRef :: Ref a %1 -> (a, Ref a)
- unsafeWriteRef :: Ref a %1 -> a %1 -> Ref a
- atomicModify :: (a %1 -> (b, a)) %1 -> Ref a %1 -> (b, Ref a)
- atomicModify_ :: (a %1 -> a) %1 -> Ref a %1 -> Ref a
Documentation
Linearly owned mutable reference.
Instances
| LinearOnly (Ref a :: Type) Source # | |
Defined in Data.Ref.Linear Methods linearOnly :: LinearOnlyWitness (Ref a) Source # | |
| Consumable a => Consumable (Ref a) Source # | |
Defined in Data.Ref.Linear | |
| Dupable a => Dupable (Ref a) Source # | |
| Affine (Ref a) Source # | |
| Dupable a => Clone (Ref a) Source # | |
| Unsatisfiable ('ShowType (Ref a) ':<>: 'Text " cannot be copied!") => Copyable (Ref a) Source # | |
Defined in Data.Ref.Linear | |
unsafeReadRef :: Ref a %1 -> (a, Ref a) Source #
unsafeWriteRef :: Ref a %1 -> a %1 -> Ref a Source #
atomicModify :: (a %1 -> (b, a)) %1 -> Ref a %1 -> (b, Ref a) Source #
atomicModify_ :: (a %1 -> a) %1 -> Ref a %1 -> Ref a Source #