simonmar/monad-par — Issue #7: Add a Par+Log that adds print messages to Par implemenations
Author: rrnewton
Created: 2011-10-10 13:58:04+00:00
State: open
Labels: FeatureOrImprovement

For printf-debugging inside Par it would be awfully nice if there were a layer offering print messages on top of any of the Par schedulers. Just like the Par+RNG this would involve a StateT, but in this case it would keep track of logged messages and return them at the end.

It would be deterministic of course. The result is a binary tree of ordered lists of messages. Displaying that effectively would be important.
You would want to see these messages before Par completes. That would require that runPar return both an answer and a (lazy) log of messages. And that in turn would bring the problems of lazy IO....