aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-02-04 20:14:55 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-02-04 20:14:55 +0000
commit7d7fb11a158fcd20ae63c4590f0857672975f7ab (patch)
tree46ed031f20e55a347ef34d996e0c7142b5607230 /interp
parentb4ff3ab1a0508478aba9b7a6f8b990600e394b8f (diff)
Utilisation du section_path pour le parsing des notations primitives,
dans la mesure où le nom d'un module est différent selon qu'on est en cours de compilation (MPself) ou requis (MPfile) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7984 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r--interp/notation.ml12
-rw-r--r--interp/notation.mli2
2 files changed, 7 insertions, 7 deletions
diff --git a/interp/notation.ml b/interp/notation.ml
index 4b85faf8d..d068cf64c 100644
--- a/interp/notation.ml
+++ b/interp/notation.ml
@@ -195,7 +195,7 @@ let pattern_key = function
(**********************************************************************)
(* Interpreting numbers (not in summary because functional objects) *)
-type required_module = global_reference * string list
+type required_module = section_path * string list
type 'a prim_token_interpreter =
loc -> 'a -> rawconstr
@@ -241,8 +241,8 @@ let declare_string_interpreter sc dir interp (patl,uninterp,inpat) =
(fun cont loc -> function String s -> delay dir interp loc s | p -> cont loc p)
(patl, (fun r -> option_app mkString (uninterp r)), inpat)
-let check_required_module loc sc (ref,d) =
- try let _ = sp_of_global ref in ()
+let check_required_module loc sc (sp,d) =
+ try let _ = Nametab.absolute_reference sp in ()
with Not_found ->
user_err_loc (loc,"prim_token_interpreter",
str ("Cannot interpret in "^sc^" without requiring first module "
@@ -332,9 +332,9 @@ let find_prim_token g loc p sc =
g (rawconstr_of_aconstr loc c),df
with Not_found ->
(* Try for a primitive numerical notation *)
- let (dir,interp) = Hashtbl.find prim_token_interpreter_tab sc loc p in
- check_required_module loc sc dir;
- g (interp ()), (dirpath (sp_of_global (fst dir)),"")
+ let (spdir,interp) = Hashtbl.find prim_token_interpreter_tab sc loc p in
+ check_required_module loc sc spdir;
+ g (interp ()), (dirpath (fst spdir),"")
let interp_prim_token_gen g loc p scopes =
let all_scopes = push_scopes scopes !scope_stack in
diff --git a/interp/notation.mli b/interp/notation.mli
index 624704f37..d4c36d9e7 100644
--- a/interp/notation.mli
+++ b/interp/notation.mli
@@ -58,7 +58,7 @@ val find_delimiters_scope : loc -> delimiters -> scope_name
an appropriate error message *)
type notation_location = dir_path * string
-type required_module = global_reference * string list
+type required_module = section_path * string list
type cases_pattern_status = bool (* true = use prim token in patterns *)
type 'a prim_token_interpreter =