-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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' propAs 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?
- Are you? 😃
coot
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request