Module Report


module Report: sig .. end
Module providing functions to print errors in a way the compilation mode of Emacs understands while handling verbosity level and locations.

exception Error
Exception raised after printing an error message.
val verbosity : int Pervasives.ref
Verbosity level. Defines the amount of logging messages outputed. Default is 1. 0 means quiet (only warning and error messages get printed).
val nlogf : int -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
nflogf n ff f <args> prints a log message like Format.fprintf if n is greater or equal to verbosity.

Starting from level 4, the message is also indented from 2*(n-3) spaces.

val warning_loc : Location.t -> ('a, Format.formatter, unit, unit) Pervasives.format4 -> 'a
Prints a warning message along with location.
val error_loc : Location.t -> ('a, Format.formatter, unit, 'b) Pervasives.format4 -> 'a
Prints an error message along with location and raises Error.
val silent : (unit -> 'a) -> 'a
silent f executes function f without printing any log message.