Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class (ContractModel state, IsRunnable m) => RunModel state m where Source #
perform :: ModelState state -> Action state -> (forall t. HasSymbolicRep t => Symbolic t -> t) -> RunMonad m () Source #
Perform an Action
in some state
in the Monad
m
. This
is the function that's used to exercise the actual stateful
implementation, usually through various side-effects as permitted
by m
. It produces a value of type a
, eg. some observable
output from the Action
that should later be kept in the
environment through a `Var a` also passed to the nextState
function.
The Lookup
parameter provides an environment to lookup `Var
a` instances from previous steps.
monitoring :: (ModelState state, ModelState state) -> Action state -> (forall t. HasSymbolicRep t => Symbolic t -> t) -> SymIndex -> Property -> Property Source #
RunMonad | |
|
Instances
liftRunMonad :: (forall a. m a -> n a) -> RunMonad m a -> RunMonad n a Source #
registerSymbolic :: (Monad m, HasSymbolicRep t) => String -> t -> RunMonad m () Source #
type DefaultRealized m = (Realized m SymIndex ~ SymIndex, Realized m () ~ ()) Source #
class (DefaultRealized m, HasChainIndex m, Monad m) => IsRunnable m where Source #
Instances
IsRunnable m => IsRunnable (RunMonad m) Source # | |
Defined in Test.QuickCheck.ContractModel.Internal | |
(DefaultRealized m, IsRunnable m) => IsRunnable (ReaderT r m) Source # | |
Defined in Test.QuickCheck.ContractModel.Internal | |
(DefaultRealized m, IsRunnable m) => IsRunnable (StateT s m) Source # | |
Defined in Test.QuickCheck.ContractModel.Internal | |
(Monoid w, DefaultRealized m, IsRunnable m) => IsRunnable (WriterT w m) Source # | |
Defined in Test.QuickCheck.ContractModel.Internal |
translateSymbolic :: (Var SymIndex -> SymIndex) -> SymbolicSemantics Source #
data ContractModelResult state Source #
ContractModelResult | |
|
runContractModel :: (ContractModel state, RunModel state m, HasChainIndex m) => Actions state -> PropertyM (RunMonad m) (ContractModelResult state) Source #
data BalanceChangeOptions Source #
BalanceChangeOptions | |
|
assertBalanceChangesMatch :: BalanceChangeOptions -> ContractModelResult state -> Property Source #
Orphan instances
(Monad m, HasChainIndex m) => HasChainIndex (PostconditionM m) Source # | |
getChainIndex :: PostconditionM m ChainIndex Source # getChainState :: PostconditionM m ChainState Source # |