aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2014-07-21 16:52:52 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2014-07-21 17:21:54 +0200
commit4a268c0ddd21d4e8e07495c362757c4c6f477fcc (patch)
tree3fc3ffb55e5ab0091c9df025fd0d617c2c3e1aff /toplevel
parentf27df397b49d2bb469e513749cade21e5c259926 (diff)
Unifying locate code, also making it more powerful: it is now able to find
any prefix of the given qualid.
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/vernacentries.ml13
1 files changed, 1 insertions, 12 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 4141f9f56..4106d29df 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -397,17 +397,6 @@ let print_located_library r =
| Library.LibUnmappedDir -> err_unmapped_library loc qid
| Library.LibNotFound -> err_notfound_library loc qid
-let print_located_module r =
- let (loc,qid) = qualid_of_reference r in
- try
- let dir = Nametab.full_name_module qid in
- msg_notice (str "Module " ++ pr_dirpath dir)
- with Not_found ->
- if DirPath.is_empty (fst (repr_qualid qid)) then
- msg_error (str "No module is referred to by basename" ++ spc () ++ pr_qualid qid)
- else
- msg_error (str "No module is referred to by name" ++ spc () ++ pr_qualid qid)
-
let smart_global r =
let gr = Smartlocate.smart_global r in
Dumpglob.add_glob (Constrarg.loc_of_or_by_notation loc_of_reference r) gr;
@@ -1540,7 +1529,7 @@ let vernac_locate = function
(Notation.locate_notation
(Constrextern.without_symbols pr_lglob_constr) ntn sc)
| LocateLibrary qid -> print_located_library qid
- | LocateModule qid -> print_located_module qid
+ | LocateModule qid -> msg_notice (print_located_module qid)
| LocateTactic qid -> msg_notice (print_located_tactic qid)
| LocateFile f -> msg_notice (locate_file f)