In the code I need to test I need a source for unique comparable ids (to determine thread priorities; due to reentrancy, ThreadId is not quite good enough, I fear).
In the production code (normal IO), I can use newUnique. When testing, it seems I have to wrap it it in liftIO. This works, but is not optimal, as ideally I’d like dejafu to explore all possible priority orderings of the threads (as it does, I believe, for threadid?).
Could there be a MonadUnique abstracting over newUnique that explores that?
In the code I need to test I need a source for unique comparable ids (to determine thread priorities; due to reentrancy,
ThreadId
is not quite good enough, I fear).In the production code (normal IO), I can use
newUnique
. When testing, it seems I have to wrap it it inliftIO
. This works, but is not optimal, as ideally I’d like dejafu to explore all possible priority orderings of the threads (as it does, I believe, for threadid?).Could there be a
MonadUnique
abstracting overnewUnique
that explores that?