Module Report (.ml)


module Report: sig .. end
This module is used by the report-generated code, to compute documents.


type 'a report_ele =
| Leaf of (unit -> string)
| Tag of 'a tag
| List of 'a liste
| Cond of 'a cond
| Sub of 'a sub
A report element.

type 'a tag = {
   mutable tag : string;
   mutable atts : (string * (unit -> string)) list;
   mutable tag_subs : 'a report_ele list;
}
A tag.

type 'a liste = {
   mutable list_subs : 'a -> 'a report_ele list;
   mutable f : unit -> 'a list;
}
A list of substructures.

type 'a cond = {
   mutable cond : unit -> bool;
   mutable subs_then : 'a report_ele list;
   mutable subs_else : 'a report_ele list;
}
Conditional

type 'a sub = {
   mutable sub_rep : unit -> 'a report;
}
type 'a report = {
   mutable rep_eles : 'a report_ele list;
}
A report description is a list of report elements.
val coerce : 'a -> 'b
Coerce report elements.
val compute : ?html:bool -> Format.formatter -> 'a report -> unit
Compute a report and print it to the given formatter.
val compute_file : ?html:bool -> string -> 'a report -> unit
Compute a report and print it in a file.