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