Module Ppxlib.Location

Overrides the Location module of OCaml

type t = Warnings.loc = {
loc_start : Stdlib.Lexing.position;
loc_end : Stdlib.Lexing.position;
loc_ghost : Base.Bool.t;
}
val in_file : Base.String.t -> t

Return an empty ghost range located in a given file.

val none : t

An arbitrary value of type t; describes an empty ghost range.

val raise_errorf : ?⁠loc:t -> ('aCaml.Format.formatterBase.Unit.t'b) Stdlib.format4 -> 'a

Raise a located error. The exception is caught by driver and handled appropriately

val of_lexbuf : Stdlib.Lexing.lexbuf -> t

Return the location corresponding to the last matched regular expression

val report_exception : Caml.Format.formatter -> Base.Exn.t -> Base.Unit.t

Report an exception on the given formatter

Prints File "...", line ..., characters ...-...:

type nonrec 'a loc = 'a Ocaml_common.Location.loc = {
txt : 'a;
loc : t;
}
val compare_pos : Stdlib.Lexing.position -> Stdlib.Lexing.position -> Base.Int.t
val min_pos : Stdlib.Lexing.position -> Stdlib.Lexing.position -> Stdlib.Lexing.position
val max_pos : Stdlib.Lexing.position -> Stdlib.Lexing.position -> Stdlib.Lexing.position
val compare : t -> t -> Base.Int.t
module Error : sig ... end with type Error.location := t
exception Error of Error.t