Module IBase.Location

type t = {
  1. file : SourceFile.t;
    (*

    The name of the source file

    *)
  2. line : int;
    (*

    The line number. -1 means "do not know"

    *)
  3. col : int;
    (*

    The column number. -1 means "do not know"

    *)
  4. macro_file_opt : SourceFile.t option;
    (*

    If the location is coming from macro expansion, the name of the file macro is defined in

    *)
  5. macro_line : int;
    (*

    If the location is coming from macro expansion, the line number

    *)
}

Location in the original source file

include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hash_normalize : t -> t
val hash_normalize_opt : t option -> t option
val hash_normalize_list : t list -> t list
val get_macro_file_line_opt : t -> (SourceFile.t * int) option
val equal : t -> t -> bool
val none : SourceFile.t -> t

Dummy source location for the given file

val dummy : t

Dummy location with no source file

val pp : Stdlib.Format.formatter -> t -> unit

Pretty print a location.

val pp_line : Stdlib.Format.formatter -> t -> unit

print just the line information

val to_string : t -> string

String representation of a location.

val pp_file_pos : Stdlib.Format.formatter -> t -> unit

Pretty print a file-position of a location

val pp_range : Stdlib.Format.formatter -> (t * t) -> unit
module Map : IStdlib.PrettyPrintable.PPMap with type key = t