aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-01-16 13:02:55 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-04-24 23:58:22 +0200
commitad3aab9415b98a247a6cbce05752632c3c42391c (patch)
tree1fba7e25aa16dbb7e42db283f8210b31a0b8931d /lib
parent6d9e008ffd81bbe927e3442fb0c37269ed25b21f (diff)
[location] Move Glob_term.cases_pattern to located.
We continue the uniformization pass. No big news here, trying to be minimally invasive.
Diffstat (limited to 'lib')
-rw-r--r--lib/loc.ml3
-rw-r--r--lib/loc.mli1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/loc.ml b/lib/loc.ml
index 8ae8fe25d..8d7432ff4 100644
--- a/lib/loc.ml
+++ b/lib/loc.ml
@@ -63,7 +63,8 @@ type 'a located = t * 'a
let to_pair x = x
let tag ?loc x = Option.default ghost loc, x
-let with_loc f (loc, x) = f ~loc 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)
diff --git a/lib/loc.mli b/lib/loc.mli
index 7fc8efaa8..3f484bc4c 100644
--- a/lib/loc.mli
+++ b/lib/loc.mli
@@ -62,6 +62,7 @@ val to_pair : 'a located -> t * 'a
val tag : ?loc:t -> 'a -> 'a located
val with_loc : (loc:t -> 'a -> 'b) -> 'a located -> 'b
+val with_unloc : ('a -> 'b) -> 'a located -> 'b
val map : ('a -> 'b) -> 'a located -> 'b located
val map_with_loc : (loc:t -> 'a -> 'b) -> 'a located -> 'b located