diff options
author | notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-07-08 10:23:06 +0000 |
---|---|---|
committer | notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-07-08 10:23:06 +0000 |
commit | 826ad396a6bdc7bf55b4364a4c67dc9bbcddf525 (patch) | |
tree | 68c3f0bc4970be0bdd85a7479999ab45ff93707a | |
parent | c63367d05354834211cadb38340334960e8106f8 (diff) |
Suite de la révision #11212
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11214 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | library/library.ml | 7 | ||||
-rw-r--r-- | library/library.mli | 1 | ||||
-rw-r--r-- | toplevel/vernacentries.ml | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/library/library.ml b/library/library.ml index bcff15b25..eb2b4f06d 100644 --- a/library/library.ml +++ b/library/library.ml @@ -572,8 +572,7 @@ let (in_require, out_require) = let xml_require = ref (fun d -> ()) let set_xml_require f = xml_require := f -let require_library qidl export = - let modrefl = List.map try_locate_qualified_library qidl in +let require_library_from_dirpath modrefl export = let needed = List.rev (List.fold_left rec_intern_library [] modrefl) in let modrefl = List.map fst modrefl in if Lib.is_modtype () || Lib.is_module () then @@ -588,6 +587,10 @@ let require_library qidl export = if !Flags.xml_export then List.iter !xml_require modrefl; add_frozen_state () +let require_library qidl export = + let modrefl = List.map try_locate_qualified_library qidl in + require_library_from_dirpath modrefl export + let require_library_from_file idopt file export = let modref,needed = rec_intern_library_from_file idopt file in let needed = List.rev needed in diff --git a/library/library.mli b/library/library.mli index ec911fc0f..c6bd8fe0b 100644 --- a/library/library.mli +++ b/library/library.mli @@ -26,6 +26,7 @@ open Libobject (*s Require = load in the environment + open (if the optional boolean is not [None]); mark also for export if the boolean is [Some true] *) val require_library : qualid located list -> bool option -> unit +val require_library_from_dirpath : (dir_path * string) list -> bool option -> unit val require_library_from_file : identifier option -> System.physical_path -> bool option -> unit diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index 4d7300833..758f57c06 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -571,9 +571,10 @@ let vernac_end_segment lid = let vernac_require import _ qidl = let qidl = List.map qualid_of_reference qidl in - let modrefl = List.map (fun qid -> let (dp, _) = (Library.try_locate_qualified_library qid) in dp) qidl in - List.iter2 (fun (loc, _) dp -> Dumpglob.dump_libref loc dp "lib") qidl modrefl; - Library.require_library qidl import + let modrefl = List.map Library.try_locate_qualified_library qidl in +(* let modrefl = List.map (fun qid -> let (dp, _) = (Library.try_locate_qualified_library qid) in dp) qidl in *) + List.iter2 (fun (loc, _) dp -> Dumpglob.dump_libref loc dp "lib") qidl (List.map fst modrefl); + Library.require_library_from_dirpath modrefl import let vernac_canonical r = Recordops.declare_canonical_structure (global_with_alias r) |