Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ValidationMode = ValidationMode { }
- fromBlockValidationMode :: BlockValidationMode -> ValidationMode
- orThrowErrorInBlockValidationMode :: ( MonadError e m, MonadReader ValidationMode m) => Bool -> e -> m ()
- askBlockValidationMode :: MonadReader ValidationMode m => m BlockValidationMode
- askTxValidationMode :: MonadReader ValidationMode m => m TxValidationMode
- whenBlockValidation :: ( MonadError err m, MonadReader ValidationMode m) => m () -> m ()
- whenTxValidation :: ( MonadError err m, MonadReader ValidationMode m) => m () -> m ()
- unlessNoTxValidation :: ( MonadError err m, MonadReader ValidationMode m) => m () -> m ()
- wrapErrorWithValidationMode :: ( MonadError e' m, MonadReader ValidationMode m) => ReaderT ValidationMode ( Either e) a -> (e -> e') -> m a
Documentation
data ValidationMode Source #
Instances
Show ValidationMode Source # | |
Defined in Cardano.Chain.ValidationMode |
fromBlockValidationMode :: BlockValidationMode -> ValidationMode Source #
Helper function which accepts a
BlockValidationMode
, constructs a
sensible
TxValidationMode
based on that, and constructs a
ValidationMode
orThrowErrorInBlockValidationMode :: ( MonadError e m, MonadReader ValidationMode m) => Bool -> e -> m () infix 1 Source #
whenBlockValidation :: ( MonadError err m, MonadReader ValidationMode m) => m () -> m () Source #
Perform an action only when in the
BlockValidation
mode. Otherwise, do
nothing.
whenTxValidation :: ( MonadError err m, MonadReader ValidationMode m) => m () -> m () Source #
Perform an action only when in the
TxValidation
mode. Otherwise, do
nothing.
unlessNoTxValidation :: ( MonadError err m, MonadReader ValidationMode m) => m () -> m () Source #
Perform an action unless in the
NoTxValidation
mode.
wrapErrorWithValidationMode :: ( MonadError e' m, MonadReader ValidationMode m) => ReaderT ValidationMode ( Either e) a -> (e -> e') -> m a infix 1 Source #