`sig
type t =
Warnings.loc = {
loc_start : Stdlib.Lexing.position;
loc_end : Stdlib.Lexing.position;
loc_ghost : bool;
}
val none : Location.t
val is_none : Location.t -> bool
val in_file : string -> Location.t
val init : Stdlib.Lexing.lexbuf -> string -> unit
val curr : Stdlib.Lexing.lexbuf -> Location.t
val symbol_rloc : unit -> Location.t
val symbol_gloc : unit -> Location.t
val rhs_loc : int -> Location.t
val rhs_interval : int -> int -> Location.t
val get_pos_info : Stdlib.Lexing.position -> string * int * int
type 'a loc = { txt : 'a; loc : Location.t; }
val mknoloc : 'a -> 'a Location.loc
val mkloc : 'a -> Location.t -> 'a Location.loc
val input_name : string Stdlib.ref
val input_lexbuf : Stdlib.Lexing.lexbuf option Stdlib.ref
val input_phrase_buffer : Stdlib.Buffer.t option Stdlib.ref
val echo_eof : unit -> unit
val reset : unit -> unit
val rewrite_absolute_path : string -> string
val absolute_path : string -> string
val show_filename : string -> string
val print_filename : Stdlib.Format.formatter -> string -> unit
val print_loc : Stdlib.Format.formatter -> Location.t -> unit
val print_locs : Stdlib.Format.formatter -> Location.t list -> unit
val highlight_terminfo :
Stdlib.Lexing.lexbuf ->
Stdlib.Format.formatter -> Location.t list -> unit
type msg = (Stdlib.Format.formatter -> unit) Location.loc
val msg :
?loc:Location.t ->
('a, Stdlib.Format.formatter, unit, Location.msg) Stdlib.format4 -> 'a
type report_kind =
Report_error
| Report_warning of string
| Report_warning_as_error of string
| Report_alert of string
| Report_alert_as_error of string
type report = {
kind : Location.report_kind;
main : Location.msg;
sub : Location.msg list;
}
type report_printer = {
pp :
Location.report_printer ->
Stdlib.Format.formatter -> Location.report -> unit;
pp_report_kind :
Location.report_printer ->
Location.report ->
Stdlib.Format.formatter -> Location.report_kind -> unit;
pp_main_loc :
Location.report_printer ->
Location.report -> Stdlib.Format.formatter -> Location.t -> unit;
pp_main_txt :
Location.report_printer ->
Location.report ->
Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit;
pp_submsgs :
Location.report_printer ->
Location.report -> Stdlib.Format.formatter -> Location.msg list -> unit;
pp_submsg :
Location.report_printer ->
Location.report -> Stdlib.Format.formatter -> Location.msg -> unit;
pp_submsg_loc :
Location.report_printer ->
Location.report -> Stdlib.Format.formatter -> Location.t -> unit;
pp_submsg_txt :
Location.report_printer ->
Location.report ->
Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit;
}
val batch_mode_printer : Location.report_printer
val terminfo_toplevel_printer :
Stdlib.Lexing.lexbuf -> Location.report_printer
val best_toplevel_printer : unit -> Location.report_printer
val print_report : Stdlib.Format.formatter -> Location.report -> unit
val report_printer : (unit -> Location.report_printer) Stdlib.ref
val default_report_printer : unit -> Location.report_printer
val report_warning : Location.t -> Warnings.t -> Location.report option
val warning_reporter :
(Location.t -> Warnings.t -> Location.report option) Stdlib.ref
val default_warning_reporter :
Location.t -> Warnings.t -> Location.report option
val formatter_for_warnings : Stdlib.Format.formatter Stdlib.ref
val print_warning :
Location.t -> Stdlib.Format.formatter -> Warnings.t -> unit
val prerr_warning : Location.t -> Warnings.t -> unit
val report_alert : Location.t -> Warnings.alert -> Location.report option
val alert_reporter :
(Location.t -> Warnings.alert -> Location.report option) Stdlib.ref
val default_alert_reporter :
Location.t -> Warnings.alert -> Location.report option
val print_alert :
Location.t -> Stdlib.Format.formatter -> Warnings.alert -> unit
val prerr_alert : Location.t -> Warnings.alert -> unit
val deprecated :
?def:Location.t -> ?use:Location.t -> Location.t -> string -> unit
val alert :
?def:Location.t ->
?use:Location.t -> kind:string -> Location.t -> string -> unit
type error = Location.report
val error :
?loc:Location.t -> ?sub:Location.msg list -> string -> Location.error
val errorf :
?loc:Location.t ->
?sub:Location.msg list ->
('a, Stdlib.Format.formatter, unit, Location.error) Stdlib.format4 -> 'a
val error_of_printer :
?loc:Location.t ->
?sub:Location.msg list ->
(Stdlib.Format.formatter -> 'a -> unit) -> 'a -> Location.error
val error_of_printer_file :
(Stdlib.Format.formatter -> 'a -> unit) -> 'a -> Location.error
val register_error_of_exn : (exn -> Location.error option) -> unit
val error_of_exn :
exn -> [ `Already_displayed | `Ok of Location.error ] option
exception Error of Location.error
exception Already_displayed_error
val raise_errorf :
?loc:Location.t ->
?sub:Location.msg list ->
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val report_exception : Stdlib.Format.formatter -> exn -> unit
end`