package mdx

  1. Overview
  2. Docs
include module type of struct include Migrate_parsetree.Ast_406.Location end
type t = Warnings.loc = {
  1. loc_start : Stdlib.Lexing.position;
  2. loc_end : Stdlib.Lexing.position;
  3. 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 = {
  1. txt : 'a;
  2. 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 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
val msg : ?loc:t -> ('a, Stdlib.Format.formatter, unit, msg) Stdlib.format4 -> 'a
type report_kind = Location.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 = Location.report = {
  1. kind : report_kind;
  2. main : msg;
  3. sub : msg list;
}
type report_printer = Location.report_printer = {
  1. pp : report_printer -> Stdlib.Format.formatter -> report -> unit;
  2. pp_report_kind : report_printer -> report -> Stdlib.Format.formatter -> report_kind -> unit;
  3. pp_main_loc : report_printer -> report -> Stdlib.Format.formatter -> t -> unit;
  4. pp_main_txt : report_printer -> report -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> unit;
  5. pp_submsgs : report_printer -> report -> Stdlib.Format.formatter -> msg list -> unit;
  6. pp_submsg : report_printer -> report -> Stdlib.Format.formatter -> msg -> unit;
  7. pp_submsg_loc : report_printer -> report -> Stdlib.Format.formatter -> t -> unit;
  8. 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
val raise_errorf : ?loc:t -> ?sub:msg list -> ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val report_exception : Stdlib.Format.formatter -> exn -> unit
val fmt : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string
val compare : t -> t -> int
val hash : 'a -> int
val is_single_line : t -> bool
val compare_start : t -> t -> int
val compare_start_col : t -> t -> int
val compare_end : t -> t -> int
val compare_end_col : t -> t -> int
val contains : t -> t -> bool
val width : t -> int
val compare_width_decreasing : t -> t -> int
OCaml

Innovation. Community. Security.