<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Hi,</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 5 Mar 2019 at 23:11, Will Yager <<a href="mailto:will.yager@gmail.com" target="_blank">will.yager@gmail.com</a>> wrote:<br>
><br>
> <a href="http://hackage.haskell.org/package/dejafu" rel="noreferrer" target="_blank">http://hackage.haskell.org/package/dejafu</a> might do what you want<br>
<br>
Thanks for the suggestion, that does look useful.<br>
>From a quick look at the documentation... am I right in thinking that<br>
this test framework only covers concurrency when you're directly using<br>
IOVars and STM?  Any concurrency that might involve other primitives,<br>
or IOVar/STM uses in libraries, wouldn't be testable?  Unless the<br>
primitives/library had also been written to use the dejafu io classes<br>
and monads of course... which might be a good idea in and of itself.<br></blockquote><div><br></div><div>Yes, that's the case.  It's a bit of an unfortunate limitation but I don't currently have a way around it.</div><div><br></div><div>You may find it interesting to look at <a href="http://adjoint.io">adjoint.io</a>'s libraft, which uses dejafu for some tests: <a href="https://github.com/adjoint-io/raft/blob/master/test/TestDejaFu.hs">https://github.com/adjoint-io/raft/blob/master/test/TestDejaFu.hs</a></div><div><br></div><div>The way they do it is by writing their library in terms of some "MonadRaft" classes, and give a concrete implementation of those classes in terms of dejafu's ConcIO monad for testing. </div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Michael Walker (<a href="http://www.barrucadu.co.uk" target="_blank">http://www.barrucadu.co.uk</a>)</div></div></div>