aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/loc.ml
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.ml
parentee2197096fe75a63b4d92cb3a1bb05122c5c625b (diff)
[location] Cleanup.
We remove some unnecessary functions introduced before in the patch series + unused functions.
Diffstat (limited to 'lib/loc.ml')
-rw-r--r--lib/loc.ml21
1 files changed, 7 insertions, 14 deletions
diff --git a/lib/loc.ml b/lib/loc.ml
index 9107dce47..ee759bdfc 100644
--- a/lib/loc.ml
+++ b/lib/loc.ml
@@ -53,31 +53,17 @@ let merge_opt l1 l2 = match l1, l2 with
let unloc loc = (loc.bp, loc.ep)
-let join_loc = merge
-
(** Located type *)
type 'a located = t option * 'a
-let to_pair x = x
let tag ?loc x = loc, x
-let obj (_,x) = x
-
-let with_loc f (loc, x) = f ?loc x
-let with_unloc f (_,x) = f x
-
let map f (l,x) = (l, f x)
-let map_with_loc f (loc, x) = (loc, f ?loc x)
-
-let located_fold_left f x (_,a) = f x a
-let located_iter2 f (_,a) (_,b) = f a b
-let down_located f (_,a) = f a
(** Exceptions *)
let location : t Exninfo.t = Exninfo.make ()
let add_loc e loc = Exninfo.add e location loc
-
let get_loc e = Exninfo.get e location
let raise ?loc e =
@@ -86,3 +72,10 @@ let raise ?loc e =
| Some loc ->
let info = Exninfo.add Exninfo.null location loc in
Exninfo.iraise (e, info)
+
+(** Deprecated *)
+let located_fold_left f x (_,a) = f x a
+let located_iter2 f (_,a) (_,b) = f a b
+let down_located f (_,a) = f a
+
+