aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/loc.mli
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-04-09 03:39:07 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-04-25 00:34:31 +0200
commit7058b9b400e252a30c1e624cbe0de26b70356d64 (patch)
tree5115f5af4231761a484e0413f4179423e183ca9a /lib/loc.mli
parentee2197096fe75a63b4d92cb3a1bb05122c5c625b (diff)
[location] Cleanup.
We remove some unnecessary functions introduced before in the patch series + unused functions.
Diffstat (limited to 'lib/loc.mli')
-rw-r--r--lib/loc.mli22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/loc.mli b/lib/loc.mli
index ec79ced5d..edcf701bf 100644
--- a/lib/loc.mli
+++ b/lib/loc.mli
@@ -34,6 +34,7 @@ val make_loc : int * int -> t
val merge : t -> t -> t
val merge_opt : t option -> t option -> t option
+(** Merge locations, usually generating the largest possible span *)
(** {5 Located exceptions} *)
@@ -49,27 +50,20 @@ val raise : ?loc:t -> exn -> 'a
(** {5 Objects with location information } *)
type 'a located = t option * 'a
-(** Embed a location in a type *)
-
-(* We would like in the future:
- * type 'a located = private { tag: t option; obj: 'a; }
- *)
-(** Warning, this API is experimental *)
-val to_pair : 'a located -> t option * 'a
val tag : ?loc:t -> 'a -> 'a located
-val obj : 'a located -> 'a
-
-val with_loc : (?loc:t -> 'a -> 'b) -> 'a located -> 'b
-val with_unloc : ('a -> 'b) -> 'a located -> 'b
+(** Embed a location in a type *)
val map : ('a -> 'b) -> 'a located -> 'b located
-val map_with_loc : (?loc:t -> 'a -> 'b) -> 'a located -> 'b located
+(** Modify an object carrying a location *)
+(** Deprecated functions *)
val located_fold_left : ('a -> 'b -> 'a) -> 'a -> 'b located -> 'a
+ [@@ocaml.deprecated "use pattern matching"]
+
val down_located : ('a -> 'b) -> 'a located -> 'b
+ [@@ocaml.deprecated "use pattern matching"]
-(* Currently not used *)
val located_iter2 : ('a -> 'b -> unit) -> 'a located -> 'b located -> unit
+ [@@ocaml.deprecated "use pattern matching"]
-(** Projects out a located object *)