aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/rawterm.ml13
-rw-r--r--pretyping/rawterm.mli1
2 files changed, 14 insertions, 0 deletions
diff --git a/pretyping/rawterm.ml b/pretyping/rawterm.ml
index 7e933a2131..3329e62c36 100644
--- a/pretyping/rawterm.ml
+++ b/pretyping/rawterm.ml
@@ -75,6 +75,19 @@ let loc_of_rawconstr = function
| RHole (None) -> dummy_loc
| RCast (loc,_,_) -> loc
+let set_loc_of_rawconstr loc = function
+ | RRef (_,a) -> RRef (loc,a)
+ | RVar (_,a) -> RVar (loc,a)
+ | RMeta (_,a) -> RMeta (loc,a)
+ | RApp (_,a,b) -> RApp (loc,a,b)
+ | RBinder (_,a,b,c,d) -> RBinder (loc,a,b,c,d)
+ | RCases (_,a,b,c,d) -> RCases (loc,a,b,c,d)
+ | ROldCase (_,a,b,c,d) -> ROldCase (loc,a,b,c,d)
+ | RRec (_,a,b,c,d) -> RRec (loc,a,b,c,d)
+ | RSort (_,a) -> RSort (loc,a)
+ | RHole _ -> RHole (Some loc)
+ | RCast (_,a,b) -> RCast (loc,a,b)
+
let join_loc (deb1,_) (_,fin2) = (deb1,fin2)
diff --git a/pretyping/rawterm.mli b/pretyping/rawterm.mli
index e3233072b2..9b8ed0a01d 100644
--- a/pretyping/rawterm.mli
+++ b/pretyping/rawterm.mli
@@ -59,4 +59,5 @@ i*)
val dummy_loc : loc
val loc_of_rawconstr : rawconstr -> loc
+val set_loc_of_rawconstr : loc -> rawconstr -> rawconstr
val join_loc : loc -> loc -> loc