concurrent-effectful
Safe HaskellNone
LanguageGHC2021

Effectful.Concurrent.MVar.Utils

Synopsis

Strict variants

These functions are strict variants of the normal functions in the sense that they act is if the MVar held its argument in WHNF e.g. MVar a = MVar !a.

To that end, MVar values are evaluated before writes and after reads.

Note that these evaluations apply only to the value in the MVar e.g. the b in withMVar' is not given any extra evaluation.

newMVar' :: forall (es :: [Effect]) a. Concurrent :> es => a -> Eff es (MVar a) Source #

Since: 0.1

takeMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> Eff es a Source #

Since: 0.1

putMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> a -> Eff es () Source #

Since: 0.1

tryTakeMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> Eff es (Maybe a) Source #

Since: 0.1

tryPutMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> a -> Eff es Bool Source #

Since: 0.1

withMVar' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es b) -> Eff es b Source #

Since: 0.1

withMVarMasked' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es b) -> Eff es b Source #

Since: 0.1

modifyMVar' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es (a, b)) -> Eff es b Source #

Since: 0.1

modifyMVar_' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> (a -> Eff es a) -> Eff es () Source #

Since: 0.1

modifyMVarMasked' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es (a, b)) -> Eff es b Source #

Since: 0.1

modifyMVarMasked_' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> (a -> Eff es a) -> Eff es () Source #

Since: 0.1

tryReadMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> Eff es (Maybe a) Source #

Since: 0.1