| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Effectful.Concurrent.MVar.Utils
Contents
Synopsis
- newMVar' :: forall (es :: [Effect]) a. Concurrent :> es => a -> Eff es (MVar a)
- takeMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> Eff es a
- putMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> a -> Eff es ()
- tryTakeMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> Eff es (Maybe a)
- tryPutMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> a -> Eff es Bool
- withMVar' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es b) -> Eff es b
- withMVarMasked' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es b) -> Eff es b
- modifyMVar' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es (a, b)) -> Eff es b
- modifyMVar_' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> (a -> Eff es a) -> Eff es ()
- modifyMVarMasked' :: forall (es :: [Effect]) a b. Concurrent :> es => MVar a -> (a -> Eff es (a, b)) -> Eff es b
- modifyMVarMasked_' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> (a -> Eff es a) -> Eff es ()
- tryReadMVar' :: forall (es :: [Effect]) a. Concurrent :> es => MVar a -> Eff es (Maybe a)
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.
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