Safe Haskell | Safe-Infered |
---|
Code in this module is not directly related to CellML, but it is rather convenience code used by the solver.
- class MonadIO m => MonadIOUnwrappable m c s | m -> c, m -> s where
- unwrapState :: m s
- unwrapMonadIO :: s -> m a -> IO (c a)
- rewrapMonadIO :: s -> c a -> m a
Documentation
class MonadIO m => MonadIOUnwrappable m c s | m -> c, m -> s whereSource
Represents a MonadIO where any change further up the monad stack can be | represented lower down in the stack.
unwrapState :: m sSource
Sets up state (e.g. an IORef) to be used to simulate the monad from the | IO monad.
unwrapMonadIO :: s -> m a -> IO (c a)Source
Maps the monad to only use IO level constructs and the state set up | using unwrapState.
rewrapMonadIO :: s -> c a -> m aSource
Reverses a previous unwrapMonadIO operation.
MonadIOUnwrappable IO Single () | |
(MonadIO m, MonadIOUnwrappable m c s) => MonadIOUnwrappable (ReaderT r m) c (r, s) | |
(MonadIO m, MonadIOUnwrappable m c s) => MonadIOUnwrappable (StateT r m) c (IORef r, s) | |
(Error e, MonadIO m, MonadIOUnwrappable m c s) => MonadIOUnwrappable (ErrorT e m) (EitherChain c e) s |