Module Feedback

type level =
| Debug
| Info
| Notice
| Warning
| Error
type doc_id = int

Document unique identifier for serialization

type route_id = int

Coq "semantic" infos obtained during execution

val default_route : route_id
type feedback_content =
| Processed
| Incomplete
| Complete
| ProcessingIn of string
| InProgress of int
| WorkerStatus of string * string
| AddedAxiom
| GlobRef of Loc.t * string * string * string * string
| GlobDef of Loc.t * string * string * string
| FileDependency of string option * string
| FileLoaded of string * string
| Custom of Loc.t option * string * Xml_datatype.xml
| Message of level * Loc.t option * Pp.t
type feedback = {
doc_id : doc_id;
span_id : Stateid.t;
route : route_id;
contents : feedback_content;
}
Feedback sent, even asynchronously, to the user interface
val add_feeder : (feedback -> unit) -> int

add_feeder f adds a feeder listiner f, returning its id

val del_feeder : int -> unit

del_feeder fid removes the feeder with id fid

val feedback : ?⁠did:doc_id -> ?⁠id:Stateid.t -> ?⁠route:route_id -> feedback_content -> unit

feedback ?did ?sid ?route fb produces feedback fb, with route and did, sid set appropiatedly, if absent, it will use the defaults set by set_id_for_feedback

val set_id_for_feedback : ?⁠route:route_id -> doc_id -> Stateid.t -> unit

set_id_for_feedback route id Set the defaults for feedback

output functions
val msg_info : ?⁠loc:Loc.t -> Pp.t -> unit

Message that displays information, usually in verbose mode, such as Foobar is defined

val msg_notice : ?⁠loc:Loc.t -> Pp.t -> unit

Message that should be displayed, such as Print Foo or Show Bar.

val msg_warning : ?⁠loc:Loc.t -> Pp.t -> unit

Message indicating that something went wrong, but without serious consequences.

val msg_debug : ?⁠loc:Loc.t -> Pp.t -> unit

For debugging purposes

val console_feedback_listener : Stdlib.Format.formatter -> feedback -> unit

Helper for tools willing to print to the feedback system

val warn_no_listeners : bool Stdlib.ref

The library will print a warning to the console if no listener is available by default; ML-clients willing to use Coq without a feedback handler should set this to false.