aivika-transformers-5.4: Transformers for the Aivika simulation library

CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.Trans.Concurrent.MVar

Description

Tested with: GHC 8.0.1

The module defines helper functions for working with MVar.

Synopsis

Documentation

withMVarComp :: (MonadComp m, MonadIO m) => MVar a -> (a -> m b) -> m b Source #

Like withMVar but operates within the specified computation.

withMVarParameter :: (MonadComp m, MonadIO m) => MVar a -> (a -> Parameter m b) -> Parameter m b Source #

Like withMVar but operates within the Parameter computation.

withMVarSimulation :: (MonadComp m, MonadIO m) => MVar a -> (a -> Simulation m b) -> Simulation m b Source #

Like withMVar but operates within the Simulation computation.

withMVarDynamics :: (MonadComp m, MonadIO m) => MVar a -> (a -> Dynamics m b) -> Dynamics m b Source #

Like withMVar but operates within the Dynamics computation.

withMVarEvent :: (MonadComp m, MonadIO m) => MVar a -> (a -> Event m b) -> Event m b Source #

Like withMVar but operates within the Event computation.

withMVarProcess :: (MonadDES m, MonadIO m) => MVar a -> (a -> Process m b) -> Process m b Source #

Like withMVar but operates within the Process computation.