Module Ppxlib_ast__Import.Location
include Ocaml_common.Location
type t
= Warnings.loc
=
{
loc_start : Stdlib.Lexing.position;
loc_end : Stdlib.Lexing.position;
loc_ghost : bool;
}
val none : t
val in_file : string -> t
val init : Stdlib.Lexing.lexbuf -> string -> unit
val curr : Stdlib.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 : Stdlib.Lexing.position -> string * int * int
type 'a loc
= 'a Location.loc
=
{
txt : 'a;
loc : t;
}
val mknoloc : 'a -> 'a loc
val mkloc : 'a -> t -> 'a 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 -> t -> unit
val print_locs : Stdlib.Format.formatter -> t list -> unit
val highlight_terminfo : Stdlib.Lexing.lexbuf -> Stdlib.Format.formatter -> t list -> unit
type msg
= (Stdlib.Format.formatter -> unit) loc
type report_kind
= Location.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
= Location.report
=
{
kind : report_kind;
main : msg;
sub : msg list;
}
type report_printer
= Location.report_printer
=
{
pp : report_printer -> Stdlib.Format.formatter -> report -> unit;
pp_report_kind : report_printer -> report -> Stdlib.Format.formatter -> report_kind -> unit;
pp_main_loc : report_printer -> report -> Stdlib.Format.formatter -> t -> unit;
pp_main_txt : report_printer -> report -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit;
pp_submsgs : report_printer -> report -> Stdlib.Format.formatter -> msg list -> unit;
pp_submsg : report_printer -> report -> Stdlib.Format.formatter -> msg -> unit;
pp_submsg_loc : report_printer -> report -> Stdlib.Format.formatter -> t -> unit;
pp_submsg_txt : report_printer -> report -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit;
}
val batch_mode_printer : report_printer
val terminfo_toplevel_printer : Stdlib.Lexing.lexbuf -> report_printer
val best_toplevel_printer : unit -> report_printer
val print_report : Stdlib.Format.formatter -> report -> unit
val report_printer : (unit -> report_printer) Stdlib.ref
val default_report_printer : unit -> report_printer
val report_warning : t -> Warnings.t -> report option
val warning_reporter : (t -> Warnings.t -> report option) Stdlib.ref
val default_warning_reporter : t -> Warnings.t -> report option
val formatter_for_warnings : Stdlib.Format.formatter Stdlib.ref
val print_warning : t -> Stdlib.Format.formatter -> Warnings.t -> unit
val prerr_warning : t -> Warnings.t -> unit
val report_alert : t -> Warnings.alert -> report option
val alert_reporter : (t -> Warnings.alert -> report option) Stdlib.ref
val default_alert_reporter : t -> Warnings.alert -> report option
val print_alert : t -> Stdlib.Format.formatter -> Warnings.alert -> unit
val prerr_alert : t -> Warnings.alert -> unit
val deprecated : ?def:t -> ?use:t -> t -> string -> unit
val alert : ?def:t -> ?use:t -> kind:string -> t -> string -> unit
type error
= report
val error : ?loc:t -> ?sub:msg list -> string -> error
val errorf : ?loc:t -> ?sub:msg list -> ('a, Stdlib.Format.formatter, unit, error) Stdlib.format4 -> 'a
val error_of_printer : ?loc:t -> ?sub:msg list -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> error
val error_of_printer_file : (Stdlib.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
exception
Already_displayed_error