Module Effects.Bookkeeping

module type S = sig ... end

Module type of a bookkeeping

type 'a mode =
  1. | Ignore
    (*

    Handle the effect by ignoring it, so don't collect any information.

    *)
  2. | Dump of 'a
    (*

    Handle the effect, and dump the information according to the relevant configuration. The value is the parameter passed to the feature's dump handler.

    *)
  3. | Caller
    (*

    The effect is already handled by the caller, nothing needs to be done.

    *)

The different ways a managed effect can be handled.

val manage : (module M : S) -> M.arg mode -> (unit -> 'a) -> 'a