Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pin the path of execution to a particular trace #181
While working on a dejafu test-case I thought of a feature that, I think, could be very useful to debug test failures:
Consider the following example.
Thanks for the suggestion. You can do this already, with a little work:
replay :: (MonadConc n, MonadRef r n) => MemType -> Trace -> ConcT r n a -> n (Either Failure a, s, Trace) replay = runConcurrent (Scheduler sched) where sched (Just (tid, _)) _ ((Continue, _, _):rest) = (Just tid, rest) sched _ _ ((Start tid, _, _):rest) = (Just tid, rest) sched _ _ ((SwitchTo tid, _, _):rest) = (Just tid, rest) sched _ _ rest = (Nothing, rest)
Although I agree it would be better to have this in dejafu itself.