A module that re-exports all the parts of the library related to tracing.
The idea of tracing is to record the concurrent events (i.e. channel communications
and barrier synchronisations) that occur during a run of the program. You
can think of it as automatically turning on a lot of debug logging.
Typically, at the top-level of your program you should have:
main :: IO ()
main = runCHP myMainProcess
To turn on the tracing mechanism of your choice (for example, CSP-style tracing)
to automatically print out the trace after completion of your program, just
use the appropriate helper function:
main :: IO ()
main = runCHP_CSPTraceAndPrint myMainProcess
It could hardly be easier. If you want more fine-grained control and examination
of the trace, you can use the helper functions of the form runCHP_CSPTrace
that give back a data structure representing the trace, which you can then
manipulate. The Doc used by the traces is from the Text.PrettyPrint.HughesPJ
module that currently comes with GHC (I think).
|