aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
authornotin2008-07-07 15:58:36 +0000
committernotin2008-07-07 15:58:36 +0000
commita20115809c0c6a36124366fae64130e3e513c1f1 (patch)
treeee38713fc8abbaf055f60ea907259dea22662567 /interp
parentd8d585d692880cfb1a9af7245346dc43d515319d (diff)
Utilisation de try_locate_qualified_library au lieu de locate_qualified_library (suite commit #11177)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11212 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r--interp/constrintern.ml4
-rw-r--r--interp/dumpglob.ml7
-rw-r--r--interp/topconstr.ml7
-rw-r--r--interp/topconstr.mli2
4 files changed, 11 insertions, 9 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index 6c09e4acef..d2c2b0d6a8 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -250,7 +250,7 @@ let rec subst_aconstr_in_rawconstr loc interp subst (renaming,(ids,_,scopes)) =
let intern_notation intern (_,tmp_scope,scopes as env) loc ntn args =
let ntn,args = contract_notation ntn args in
let ((ids,c),df) = Notation.interp_notation loc ntn (tmp_scope,scopes) in
- if !Flags.dump then Dumpglob.dump_notation_location (Dumpglob.ntn_loc loc args ntn) df;
+ if !Flags.dump then Dumpglob.dump_notation_location (Topconstr.ntn_loc loc args ntn) df;
let subst = List.map2 (fun (id,scl) a -> (id,(a,scl))) ids args in
subst_aconstr_in_rawconstr loc intern subst ([],env) c
@@ -616,7 +616,7 @@ let rec intern_cases_pattern genv scopes (ids,subst as aliases) tmp_scope pat =
| CPatNotation (loc, ntn, args) ->
let ntn,args = contract_pat_notation ntn args in
let ((ids',c),df) = Notation.interp_notation loc ntn (tmp_scope,scopes) in
- if !Flags.dump then Dumpglob.dump_notation_location (Dumpglob.patntn_loc loc args ntn) df;
+ if !Flags.dump then Dumpglob.dump_notation_location (Topconstr.patntn_loc loc args ntn) df;
let subst = List.map2 (fun (id,scl) a -> (id,(a,scl))) ids' args in
let ids'',pl = subst_cases_pattern loc (alias_of aliases) intern_pat subst scopes
c
diff --git a/interp/dumpglob.ml b/interp/dumpglob.ml
index 3e28307e0e..84117fafa4 100644
--- a/interp/dumpglob.ml
+++ b/interp/dumpglob.ml
@@ -207,13 +207,6 @@ let dump_libref loc dp ty =
dump_string (Printf.sprintf "R%d %s <> <> %s\n"
(fst (Util.unloc loc)) (Names.string_of_dirpath dp) ty)
-let loc_of_notation f loc args ntn =
- if args=[] or ntn.[0] <> '_' then fst (Util.unloc loc)
- else snd (Util.unloc (f (List.hd args)))
-
-let ntn_loc = loc_of_notation Topconstr.constr_loc
-let patntn_loc = loc_of_notation Topconstr.cases_pattern_expr_loc
-
let dump_notation_location pos ((path,df),sc) =
let rec next growing =
let loc = Lexer.location_function !token_number in
diff --git a/interp/topconstr.ml b/interp/topconstr.ml
index 570eae7e56..8ded0a35bd 100644
--- a/interp/topconstr.ml
+++ b/interp/topconstr.ml
@@ -947,3 +947,10 @@ type module_type_ast =
type include_ast =
| CIMTE of module_type_ast
| CIME of module_ast
+
+let loc_of_notation f loc args ntn =
+ if args=[] or ntn.[0] <> '_' then fst (Util.unloc loc)
+ else snd (Util.unloc (f (List.hd args)))
+
+let ntn_loc = loc_of_notation constr_loc
+let patntn_loc = loc_of_notation cases_pattern_expr_loc
diff --git a/interp/topconstr.mli b/interp/topconstr.mli
index 46133c27bc..aed67975dd 100644
--- a/interp/topconstr.mli
+++ b/interp/topconstr.mli
@@ -240,3 +240,5 @@ type include_ast =
| CIMTE of module_type_ast
| CIME of module_ast
+val ntn_loc : Util.loc -> constr_expr list -> string -> int
+val patntn_loc : Util.loc -> cases_pattern_expr list -> string -> int