Is your feature request related to a problem? Please describe.
The monadicIOSim callback is great, it allows you to write nice properties on top of PropertyM for IOSim. However, it runs runSimTraceST and not the IOSimPOR scheduler (for obvious reasons).
When we want to do IOSimPOR testing we have to do some spicy stuff roughly like this:
basicIOSimPOR :: Testable a => (forall s. PropertyM (IOSim s) a) -> Property
basicIOSimPOR prop = forAllBlind prop' $ \ p -> exploreSimTrace id p $ \ _ tr ->
either (flip counterexample False . show) id $ traceResult False tr
where
prop' :: Gen (forall s. IOSim s Property)
prop' = do
Capture eval <- capture
pure $ eval $ monadic' prop
As far as I can tell a version of this function could be in io-sim and currently isn't.
Describe the solution you'd like
A generalization of exploreSimTrace to PropertyM
Describe alternatives you've considered
Doing it by hand like above.
Are you willing to implement it?
Is your feature request related to a problem? Please describe.
The
monadicIOSimcallback is great, it allows you to write nice properties on top ofPropertyMforIOSim. However, it runsrunSimTraceSTand not theIOSimPORscheduler (for obvious reasons).When we want to do
IOSimPORtesting we have to do some spicy stuff roughly like this:As far as I can tell a version of this function could be in
io-simand currently isn't.Describe the solution you'd like
A generalization of
exploreSimTracetoPropertyMDescribe alternatives you've considered
Doing it by hand like above.
Are you willing to implement it?