aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2001-01-31 21:45:08 +0000
committerherbelin2001-01-31 21:45:08 +0000
commit1fda9cc1a2d8c2db92d88d3e2715d3ee86f90bf3 (patch)
tree70af27a31074c2bfa9188ce48e09cd565447d11c
parente595bdc0a43cd057cb403b2e1cac125135780549 (diff)
Bug localisation des Syntactif Definition
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1303 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--parsing/astterm.ml2
-rw-r--r--pretyping/rawterm.ml13
-rw-r--r--pretyping/rawterm.mli1
3 files changed, 15 insertions, 1 deletions
diff --git a/parsing/astterm.ml b/parsing/astterm.ml
index 13f33f977f..e78ae3cd35 100644
--- a/parsing/astterm.ml
+++ b/parsing/astterm.ml
@@ -273,7 +273,7 @@ let rawconstr_of_qualid env vars loc qid =
(* Is it a reference to a syntactic definition? *)
try
let sp = Syntax_def.locate_syntactic_definition qid in
- Syntax_def.search_syntactic_definition sp, []
+ set_loc_of_rawconstr loc (Syntax_def.search_syntactic_definition sp), []
with Not_found ->
error_global_not_found_loc loc qid
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