| Copyright | (c) Philipp Pfeiffer 2016 |
|---|---|
| License | MIT |
| Maintainer | pfiff@hax-f.net |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Control.Monad.Backend
Description
Documentation
runBackendT :: (Monad m, MonadIO m) => BackendT s m a -> s -> m (MVar s, a) Source #
runBackendT unwraps the BackendT monad on a given initial state. This given state is wrapped into an MVar.
rawRunBackendT :: BackendT s m a -> MVar s -> m (MVar s, a) Source #
rawRunBackendT unwraps then BackendT monad on a given initial state, where this state is wrapped into an MVar. **The MVar shouldn't be empty, otherwise every state reading/writing is blocking.** Usually, one should use runBackendT.