package pa_ppx_parsetree

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = Warnings.loc = {
  1. loc_start : Lexing.position;
  2. loc_end : Lexing.position;
  3. 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
type !'a loc = {
  1. txt : 'a;
  2. loc : t;
}
val mknoloc : 'a -> 'a loc
val mkloc : 'a -> t -> 'a loc
val input_name : string ref
val input_lexbuf : Lexing.lexbuf option ref
val input_phrase_buffer : Buffer.t option 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 : 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_kind =
  1. | Report_error
  2. | Report_warning of string
  3. | Report_warning_as_error of string
  4. | Report_alert of string
  5. | Report_alert_as_error of string
type report = {
  1. kind : report_kind;
  2. main : msg;
  3. sub : msg list;
}
type report_printer = {
  1. pp : report_printer -> Format.formatter -> report -> unit;
  2. pp_report_kind : report_printer -> report -> Format.formatter -> report_kind -> unit;
  3. pp_main_loc : report_printer -> report -> Format.formatter -> t -> unit;
  4. pp_main_txt : report_printer -> report -> Format.formatter -> (Format.formatter -> unit) -> unit;
  5. pp_submsgs : report_printer -> report -> Format.formatter -> msg list -> unit;
  6. pp_submsg : report_printer -> report -> Format.formatter -> msg -> unit;
  7. pp_submsg_loc : report_printer -> report -> Format.formatter -> t -> unit;
  8. 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 -> Warnings.t -> report option
val warning_reporter : (t -> Warnings.t -> report option) ref
val default_warning_reporter : t -> Warnings.t -> report option
val formatter_for_warnings : Format.formatter ref
val print_warning : t -> 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) ref
val default_alert_reporter : t -> Warnings.alert -> report option
val print_alert : t -> 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
val auto_include_alert : string -> unit
val deprecated_script_alert : string -> unit
type error = report
val error : ?loc:t -> ?sub:msg list -> string -> error
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
exception Already_displayed_error
val raise_errorf : ?loc:t -> ?sub:msg list -> ('a, Format.formatter, unit, 'b) format4 -> 'a
val report_exception : Format.formatter -> exn -> unit
OCaml

Innovation. Community. Security.