Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Internally used typeclass for operations-related actions
Synopsis
- class Functor m => MonadOpsInternal m where
- withOpsCap :: (ClevelandOpsImpl m -> m a) -> m a
Documentation
class Functor m => MonadOpsInternal m where Source #
Typeclass for monads where operations-related actions can occur.
This is implemented for MonadCleveland
and batch context.
Has Functor
as a superclass constraint for convenience, all the related methods
require it.
This is used internally to implement originate
and transfer
. There is a
more specific, more user-friendly MonadOps
class defined in
Test.Cleveland.Internal.Actions.
withOpsCap :: (ClevelandOpsImpl m -> m a) -> m a Source #
Obtain ClevelandOpsImpl
suitable for the current "monad".
In CPS style, because the "monad" can be actually not a monad, so
it can't work like ask
for ReaderT
.
Instances
MonadOpsInternal ClevelandOpsBatch Source # | |
Defined in Test.Cleveland.Internal.Actions.MonadOpsInternal withOpsCap :: (ClevelandOpsImpl ClevelandOpsBatch -> ClevelandOpsBatch a) -> ClevelandOpsBatch a Source # | |
(HasClevelandCaps caps, ClevelandBaseMonad caps ~ m) => MonadOpsInternal (ReaderT caps m) Source # | |
Defined in Test.Cleveland.Internal.Actions.MonadOpsInternal withOpsCap :: (ClevelandOpsImpl (ReaderT caps m) -> ReaderT caps m a) -> ReaderT caps m a Source # |