aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/xml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-08-06 19:00:11 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-08-06 19:00:11 +0000
commitffa57bae1e18fd52d63e8512a352ac63db15a7a9 (patch)
tree6cf537ce557f14f71ee3693d98dc20c12b64a9e4 /plugins/xml
parentda7fb3e13166747b49cdf1ecfad394ecb4e0404a (diff)
- Cleaning phase of the interfaces of libnames.ml and nametab.ml
(uniformisation of function names, classification). One of the most visible change is the renaming of section_path into full_path (the use of name section was obsolete due to the module system, but I don't know if the new name is the best chosen one - especially it remains some "sp" here and there). - Simplification of the interface of classify_object (first argument dropped). - Simplification of the code for vernac keyword "End". - Other small cleaning or dead code removal. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12265 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/xml')
-rw-r--r--plugins/xml/cic2acic.ml10
-rw-r--r--plugins/xml/xmlcommand.ml4
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/xml/cic2acic.ml b/plugins/xml/cic2acic.ml
index 13e5e6d5f..1ac022159 100644
--- a/plugins/xml/cic2acic.ml
+++ b/plugins/xml/cic2acic.ml
@@ -15,7 +15,7 @@
(* Utility Functions *)
exception TwoModulesWhoseDirPathIsOneAPrefixOfTheOther;;
-let get_module_path_of_section_path path =
+let get_module_path_of_full_path path =
let dirpath = fst (Libnames.repr_path path) in
let modules = Lib.library_dp () :: (Library.loaded_libraries ()) in
match
@@ -177,7 +177,7 @@ let uri_of_kernel_name tag =
let uri_of_declaration id tag =
let module LN = Libnames in
- let dir = LN.extract_dirpath_prefix (Lib.sections_depth ()) (Lib.cwd ()) in
+ let dir = LN.pop_dirpath_n (Lib.sections_depth ()) (Lib.cwd ()) in
let tokens = token_list_of_path dir id tag in
"cic:/" ^ String.concat "/" tokens
@@ -468,14 +468,14 @@ print_endline "PASSATO" ; flush stdout ;
match g with
Libnames.ConstructRef ((induri,_),_)
| Libnames.IndRef (induri,_) ->
- Nametab.sp_of_global (Libnames.IndRef (induri,0))
+ Nametab.path_of_global (Libnames.IndRef (induri,0))
| Libnames.VarRef id ->
(* Invariant: variables are never cooked in Coq *)
raise Not_found
- | _ -> Nametab.sp_of_global g
+ | _ -> Nametab.path_of_global g
in
Dischargedhypsmap.get_discharged_hyps sp,
- get_module_path_of_section_path sp
+ get_module_path_of_full_path sp
with Not_found ->
(* no explicit substitution *)
[], Libnames.dirpath_of_string "dummy"
diff --git a/plugins/xml/xmlcommand.ml b/plugins/xml/xmlcommand.ml
index 1ae186614..4a27c3247 100644
--- a/plugins/xml/xmlcommand.ml
+++ b/plugins/xml/xmlcommand.ml
@@ -102,7 +102,7 @@ let filter_params pvars hyps =
in
let cwd = Lib.cwd () in
let cwdsp = Libnames.make_path cwd (Names.id_of_string "dummy") in
- let modulepath = Cic2acic.get_module_path_of_section_path cwdsp in
+ let modulepath = Cic2acic.get_module_path_of_full_path cwdsp in
aux (Names.repr_dirpath modulepath) (List.rev pvars)
;;
@@ -118,7 +118,7 @@ let search_variables () =
let module N = Names in
let cwd = Lib.cwd () in
let cwdsp = Libnames.make_path cwd (Names.id_of_string "dummy") in
- let modulepath = Cic2acic.get_module_path_of_section_path cwdsp in
+ let modulepath = Cic2acic.get_module_path_of_full_path cwdsp in
let rec aux =
function
[] -> []