File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
quickcheck-dynamic/src/Test/QuickCheck Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ module Test.QuickCheck.StateModel (
31
31
monitorPost ,
32
32
counterexamplePost ,
33
33
stateAfter ,
34
+ runActionsFrom ,
34
35
runActions ,
35
36
lookUpVar ,
36
37
lookUpVarMaybe ,
@@ -548,7 +549,19 @@ runActions
548
549
)
549
550
=> Actions state
550
551
-> PropertyM m (Annotated state , Env )
551
- runActions (Actions_ rejected (Smart _ actions)) = do
552
+ runActions = runActionsFrom initialAnnotatedState
553
+
554
+ runActionsFrom
555
+ :: forall state m e
556
+ . ( StateModel state
557
+ , RunModel state m
558
+ , e ~ Error state m
559
+ , forall a . IsPerformResult e a
560
+ )
561
+ => Annotated state
562
+ -> Actions state
563
+ -> PropertyM m (Annotated state , Env )
564
+ runActionsFrom annotatedState (Actions_ rejected (Smart _ actions)) = do
552
565
let bucket = \ n -> let (a, b) = go n in show a ++ " - " ++ show b
553
566
where
554
567
go n
@@ -557,7 +570,7 @@ runActions (Actions_ rejected (Smart _ actions)) = do
557
570
where
558
571
d = div n 10
559
572
monitor $ tabulate " # of actions" [show $ bucket $ length actions]
560
- (finalState, env, names, polars) <- runSteps initialAnnotatedState [] actions
573
+ (finalState, env, names, polars) <- runSteps annotatedState [] actions
561
574
monitor $ tabulate " Actions" names
562
575
monitor $ tabulate " Action polarity" $ map show polars
563
576
unless (null rejected) $
You can’t perform that action at this time.
0 commit comments