Kappa_data_structures.Loc
Module for type Loc.t annotating structured data with the line range * in a file which was used to define it
type 'a annoted = 'a * t
val v : 'a annoted -> 'a
Extract value from Loc.annoted
Create annoted variable with same annotation as existing variable
Apply operation on variable and keep annotation
val of_pos : Stdlib.Lexing.position -> Stdlib.Lexing.position -> t
val dummy : t
val annot_with_dummy : 'a -> 'a annoted
val is_annoted_with_dummy : 'a annoted -> bool
merge b e
creates the range from beginning of b
to the end of e
(filename must match)
val to_string : t -> string
val print : Stdlib.Format.formatter -> t -> unit
val print_annoted :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a annoted ->
unit
val annoted_of_yojson :
?filenames:string array ->
(Yojson.Basic.t -> 'a) ->
Yojson.Basic.t ->
'a annoted
val yojson_of_annoted :
?filenames:int Kappa_data_structures.Mods.StringMap.t ->
('a -> Yojson.Basic.t) ->
'a annoted ->
Yojson.Basic.t
val write_position : Stdlib.Buffer.t -> position -> unit
val read_position : Yojson.Safe.lexer_state -> Stdlib.Lexing.lexbuf -> position
Annoted yojson helpers
val string_annoted_to_json :
filenames:int Kappa_data_structures.Mods.StringMap.t ->
string annoted ->
Yojson.Basic.t
val string_annoted_of_json :
filenames:string array ->
Yojson.Basic.t ->
string annoted
val string_option_annoted_to_json :
filenames:int Kappa_data_structures.Mods.StringMap.t ->
string option annoted ->
Yojson.Basic.t
val string_option_annoted_of_json :
filenames:string array ->
Yojson.Basic.t ->
string option annoted