| Copyright | Copyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com> |
|---|---|
| License | BSD3 |
| Maintainer | David Sorokin <david.sorokin@gmail.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Simulation.Aivika.Trans.Concurrent.MVar
Description
Tested with: GHC 8.0.1
The module defines helper functions for working with MVar.
- withMVarComp :: (MonadComp m, MonadIO m) => MVar a -> (a -> m b) -> m b
- withMVarParameter :: (MonadComp m, MonadIO m) => MVar a -> (a -> Parameter m b) -> Parameter m b
- withMVarSimulation :: (MonadComp m, MonadIO m) => MVar a -> (a -> Simulation m b) -> Simulation m b
- withMVarDynamics :: (MonadComp m, MonadIO m) => MVar a -> (a -> Dynamics m b) -> Dynamics m b
- withMVarEvent :: (MonadComp m, MonadIO m) => MVar a -> (a -> Event m b) -> Event m b
- withMVarProcess :: (MonadDES m, MonadIO m) => MVar a -> (a -> Process m b) -> Process m b
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 #
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 #