Hoogle Search
Within LTS Haskell 24.17 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
primitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
-
primitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
-
primitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
-
primitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
newUnliftedMutVar :: (PrimMonad m, PrimUnlifted a) => a -> m (UnliftedMutVar (PrimState m) a)primitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
readUnliftedMutVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMutVar (PrimState m) a -> m aprimitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
writeUnliftedMutVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMutVar (PrimState m) a -> a -> m ()primitive-unlifted Data.Primitive.Unlifted.MutVar No documentation available.
data
UnliftedMutVar# s (a :: UnliftedType)primitive-unlifted Data.Primitive.Unlifted.MutVar.Primops An UnliftedMutVar# behaves like a single-element mutable array.
-
primitive-unlifted Data.Primitive.Unlifted.MutVar.Primops Atomically replace the value in an UnliftedMutVar# with the given one, returning the old value. Implementation note: this really should be a GHC primop, because it is supported very efficiently in hardware, but unfortunately it's not (yet), so we implement it as a CAS loop.
-
primitive-unlifted Data.Primitive.Unlifted.MutVar.Primops Performs a machine-level compare and swap (CAS) operation on an UnliftedMutVar#. Returns a tuple containing an Int# which is '1#' when a swap is performed, along with the most "current" value from the UnliftedMutVar#. This return value can be used as the expected value if a CAS loop is required, though it may be better to get a fresh read. Note that this behavior differs from the more common CAS behavior, which is to return the old value before the CAS occured.