aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--kernel/names.ml2
-rw-r--r--kernel/names.mli1
-rw-r--r--library/nameops.ml3
-rw-r--r--library/nameops.mli2
-rw-r--r--toplevel/vernacentries.ml11
5 files changed, 9 insertions, 10 deletions
diff --git a/kernel/names.ml b/kernel/names.ml
index 7e9d9ecf3..a92adc607 100644
--- a/kernel/names.ml
+++ b/kernel/names.ml
@@ -81,8 +81,6 @@ let string_of_path sp =
if sl = [] then string_of_id id
else (string_of_dirpath sl) ^ "." ^ (string_of_id id)
-let pr_sp sp = [< 'sTR (string_of_path sp) >]
-
let sp_ord sp1 sp2 =
let (p1,id1) = repr_path sp1
and (p2,id2) = repr_path sp2 in
diff --git a/kernel/names.mli b/kernel/names.mli
index 7f410149c..08d2db357 100644
--- a/kernel/names.mli
+++ b/kernel/names.mli
@@ -47,7 +47,6 @@ val repr_path : section_path -> dir_path * identifier
(* Parsing and printing of section path as ["coq_root.module.id"] *)
val string_of_path : section_path -> string
-val pr_sp : section_path -> Pp.std_ppcmds
module Spset : Set.S with type elt = section_path
module Sppred : Predicate.S with type elt = section_path
diff --git a/library/nameops.ml b/library/nameops.ml
index 0bcaeffbc..c748f5a55 100644
--- a/library/nameops.ml
+++ b/library/nameops.ml
@@ -232,3 +232,6 @@ let path_of_string s =
make_path sl s
with
| Invalid_argument _ -> invalid_arg "path_of_string"
+
+(* Section paths *)
+let pr_sp sp = [< 'sTR (string_of_path sp) >]
diff --git a/library/nameops.mli b/library/nameops.mli
index b0376723b..35346b0a6 100644
--- a/library/nameops.mli
+++ b/library/nameops.mli
@@ -71,3 +71,5 @@ val is_dirpath_prefix_of : dir_path -> dir_path -> bool
val restrict_path : int -> section_path -> section_path
+(* Section path *)
+val pr_sp : section_path -> Pp.std_ppcmds
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index de728ee15..9b626d8bc 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -121,16 +121,13 @@ let locate_file f =
let print_located_qualid qid =
try
- let ref = Nametab.locate qid in
- mSG
- [< pr_id (Termops.id_of_global (Global.env()) ref); 'fNL >]
+ let sp = Nametab.sp_of_global (Global.env()) (Nametab.locate qid) in
+ mSG [< pr_sp sp; 'fNL >]
with Not_found ->
try
- mSG
- [< 'sTR (string_of_path (Syntax_def.locate_syntactic_definition qid));
- 'fNL >]
+ mSG [< pr_sp (Syntax_def.locate_syntactic_definition qid); 'fNL >]
with Not_found ->
- error ((Nametab.string_of_qualid qid) ^ " not a defined object")
+ error ((Nametab.string_of_qualid qid) ^ " is not a defined object")
let print_path_entry (s,l) =
[< 'sTR s; 'tBRK (0,2); 'sTR (string_of_dirpath l) >]