containers

A modular, clean and powerful extension of the OCaml standard library
Library containers
Module CCParse . Debug_
val trace_fail : string -> 'a t -> 'a t

trace_fail name p behaves like p, but prints the error message of p on stderr whenever p fails.

  • parameter name

    used as a prefix of all trace messages.

val trace_success : string -> print:( 'a -> string ) -> 'a t -> 'a t

trace_success name ~print p behaves like p, but prints successful runs of p using print.

val trace_success_or_fail : string -> print:( 'a -> string ) -> 'a t -> 'a t

Trace both error or success