It’s time for another major release of dejafu! As always, this brings backwards-incompatible changes, but hopefully this is the last we’ll see of those for a little while. The biggest change is splitting out the non-testing code to the new concurrency package. This resolves a conflict I had with wanting to keep the dependencies minimal (so people would be willing to add a new dependency over just base), and not wanting to reinvent the wheel.
Split out the Control.* modules to a separate concurrency package.
This is the big one. It allows me to depend on more things in dejafu itself without feeling bad, and reduces the API surface of both libraries, resulting in fewer future major version bumps (I hope).
Re-organise some other modules.
The module hierarchy still left in the dejafu package has been shuffled around a bit, and now hopefully makes more sense.
Drop the penultimate
Since the beginning, the termination of a thread has shown up as two separate steps in the trace:
Lift, to communicate the result back to the testing framework, and
Stopto clean up the thread. This is now all handled in the
Stop, with the result that every
Liftyou see in a trace is a distinct call to
Traces come with a key.
Traces now include a key with all the thread names in, if a thread was given a name when it was forked. The name of the initial thread is never included, to save space.
Simpler ticket implementation and usage.
peekTicketwas removed from
MonadConcand replaced with a non-monadic
peekTicket'one taking a proxy argument. The proxy is necessary because type families are not injective, so there is no other way to determine which monad we’re in. The monadic version was left as a top-level function for those who need it. This then allowed a simpler implementation in the testing code, and simpler execution traces as a result.
Reduce code duplication in testing instances.
There was a lot of duplication between the
ConcSTtypes. Everything is now done in terms of an arbitrary
MonadReftype, which is simpler.
Fewer inconsistencies, and better documentation.
There are no major plans for dejafu/concurrency in the future, but I am currently working on adding a few different algorithms to dpor (which did not get a version bump this release cycle). The dpor library itself will probably be merged back into dejafu, for version 0.4.1.0. It seems that it wasn’t as generically-useful as I thought.