A small library that extends System.Timeout.timeout. It adds the possibility of
saving partial results. Useful for AI-like algorithms that should return the
best result found within a time limit.
It comes in two variants:
(1) Simple, which only allows computations to save partial results, not
retrieve what has been written already. If a computation times out, the last
saved partial result is returned. It comes in two flavours: One that converts
saved values to WHNF, the other to NF. (This is required so that the producing
thread performs the computations, not the consuming thread.)
(2) Based on MonadWriter. The types of partial results have to be monoids.
Saving a partial result combines it with the saved value using `mappend`. It
also adds the ability to run a contained computation within another one,
without disturbing its output.
(I apologize for not being able to come up with a better package/module names.
Suggestions welcomed.)
Petr Pudlak