package logtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Location in a file

type t = {
  1. file : string;
  2. start_line : int;
  3. start_column : int;
  4. stop_line : int;
  5. stop_column : int;
}
val mk : string -> int -> int -> int -> int -> t
val mk_pair : string -> (int * int) -> (int * int) -> t
val mk_pos : Lexing.position -> Lexing.position -> t
val eq : t -> t -> bool
val hash : t -> int
val combine : t -> t -> t

LogtkPosition that spans the two given positions. The file is assumed to be the same in both case, and is chosen from one of the two positions.

val combine_list : t list -> t

N-ary version of combine.

  • raises Invalid_argument

    if the list is empty

val smaller : t -> t -> bool

smaller p1 p2 is true if p1 is included in p2, ie p1 is a sub-location of p2 (interval inclusion)

val pp : Buffer.t -> t -> unit
val fmt : Format.formatter -> t -> unit
val to_string : t -> string
val pp_opt : Buffer.t -> t option -> unit

Lexbuf

val set_file : Lexing.lexbuf -> string -> unit

Change the file name used for positions in this lexbuf

val of_lexbuf : Lexing.lexbuf -> t

Recover a position from a lexbuf

OCaml

Innovation. Community. Security.