Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module includes all the features of Control.Concurrent.MVar, except
that the functions in Data.Primitive.Unlifted.Weak subsume the functionality
of mkWeakMV
and addMVarFinalizer
, so we do not include analogues of those
functions.
Documentation
data UnliftedMVar_ s a unlifted_a Source #
UnliftedMVar (UnliftedMVar# s unlifted_a) |
Instances
unlifted_a ~ Unlifted a => Eq (UnliftedMVar_ s a unlifted_a) Source # | |
Defined in Data.Primitive.Unlifted.MVar.ST (==) :: UnliftedMVar_ s a unlifted_a -> UnliftedMVar_ s a unlifted_a -> Bool # (/=) :: UnliftedMVar_ s a unlifted_a -> UnliftedMVar_ s a unlifted_a -> Bool # | |
unlifted_a ~ Unlifted a => PrimUnlifted (UnliftedMVar_ s a unlifted_a) Source # | |
Defined in Data.Primitive.Unlifted.MVar.ST type Unlifted (UnliftedMVar_ s a unlifted_a) :: UnliftedType Source # toUnlifted# :: UnliftedMVar_ s a unlifted_a -> Unlifted (UnliftedMVar_ s a unlifted_a) Source # fromUnlifted# :: Unlifted (UnliftedMVar_ s a unlifted_a) -> UnliftedMVar_ s a unlifted_a Source # | |
type Unlifted (UnliftedMVar_ s a unlifted_a) Source # | |
Defined in Data.Primitive.Unlifted.MVar.ST |
type UnliftedMVar s a = UnliftedMVar_ s a (Unlifted a) Source #
newUnliftedMVar :: (PrimUnlifted a, PrimMonad m) => a -> m (UnliftedMVar (PrimState m) a) Source #
newEmptyUnliftedMVar :: PrimMonad m => m (UnliftedMVar (PrimState m) a) Source #
takeUnliftedMVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMVar (PrimState m) a -> m a Source #
tryTakeUnliftedMVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMVar (PrimState m) a -> m (Maybe a) Source #
putUnliftedMVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMVar (PrimState m) a -> a -> m () Source #
tryPutUnliftedMVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMVar (PrimState m) a -> a -> m Bool Source #
readUnliftedMVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMVar (PrimState m) a -> m a Source #
tryReadUnliftedMVar :: (PrimMonad m, PrimUnlifted a) => UnliftedMVar (PrimState m) a -> m (Maybe a) Source #
isEmptyUnliftedMVar :: PrimMonad m => UnliftedMVar (PrimState m) a -> m Bool Source #
swapUnliftedMVar :: (PrimMonad m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> a -> m a Source #
withUnliftedMVar :: (PrimBase m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> (a -> m b) -> m b Source #
withUnliftedMVarMasked :: (PrimBase m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> (a -> m b) -> m b Source #
modifyUnliftedMVar :: (PrimBase m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> (a -> m (a, b)) -> m b Source #
modifyUnliftedMVar_ :: (PrimBase m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> (a -> m a) -> m () Source #
modifyUnliftedMVarMasked :: (PrimBase m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> (a -> m (a, b)) -> m b Source #
modifyUnliftedMVarMasked_ :: (PrimBase m, PrimState m ~ RealWorld, PrimUnlifted a) => UnliftedMVar RealWorld a -> (a -> m a) -> m () Source #