Skip to content

Commit 54c9628

Browse files
committed
Refine monitoring's documentation
1 parent 20bb58e commit 54c9628

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

quickcheck-dynamic/src/Test/QuickCheck/StateModel.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class
146146

147147
-- | Precondition for filtering an `Action` that can meaningfully run but is supposed to fail.
148148
-- An action will run as a _negative_ action if the `precondition` fails and `validFailingAction` succeeds.
149-
-- A negative action should have _no effect_ on the model state. This may not be desierable in all
149+
-- A negative action should have _no effect_ on the model state. This may not be desirable in all
150150
-- situations - in which case one can override this semantics for book-keeping in `failureNextState`.
151151
validFailingAction :: state -> Action state a -> Bool
152152
validFailingAction _ _ = False
@@ -195,10 +195,14 @@ class (forall a. Show (Action state a), Monad m) => RunModel state m where
195195
postconditionOnFailure :: (state, state) -> Action state a -> LookUp -> Either (Error state) a -> Property
196196
postconditionOnFailure _ _ _ _ = property True
197197

198-
-- | Allows the user to attach additional information to the `Property` at each step of the process.
198+
-- | Allows the user to attach additional information to the `Property` after each succesful run of an action.
199199
-- This function is given the full transition that's been executed, including the start and ending
200200
-- `state`, the `Action`, the current environment to `Lookup` and the value produced by `perform`
201201
-- while executing this step.
202+
--
203+
-- This is just a convenience as this information can as well be attached
204+
-- to the property defined in @'postcondition'@ or @'postconditonOnFailure'@
205+
-- with the same result.
202206
monitoring :: (state, state) -> Action state a -> LookUp -> Either (Error state) a -> Property -> Property
203207
monitoring _ _ _ _ prop = prop
204208

0 commit comments

Comments
 (0)