Module Kappa_generic_toolset.Locality
type position
=
{
chr : int;
line : int;
}
type range
=
{
file : string;
from_position : position;
to_position : position;
}
type t
= range
type 'a annot
= 'a * t
type 'a maybe
= ?pos:t -> 'a
val of_pos : Lexing.position -> Lexing.position -> t
val dummy : t
val dummy_annot : 'a -> 'a annot
val has_dummy_annot : 'a annot -> bool
val merge : range -> range -> range
merge b e
creates the range from beginning ofb
to the end ofe
(filename must match)
val is_included_in : string -> position -> range -> bool
val to_string : t -> string
val print : Format.formatter -> t -> unit
val print_annot : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a annot -> unit
val annot_of_yojson : ?filenames:string array -> (Yojson.Basic.t -> 'a) -> Yojson.Basic.t -> 'a annot
val annot_to_yojson : ?filenames:int Mods.StringMap.t -> ('a -> Yojson.Basic.t) -> 'a annot -> Yojson.Basic.t
val write_position : Bi_outbuf.t -> position -> unit
val read_position : Yojson.Safe.lexer_state -> Lexing.lexbuf -> position
val write_range : Bi_outbuf.t -> t -> unit
Output a JSON value of type
t
.