aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-03-29 13:08:32 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-03-29 13:08:32 +0000
commitcf2ba65a10644d36bbfaf3a8f46c32f389175886 (patch)
tree1e80cc3b8d7809a3efe95a7200ec4516ea5c3008
parent388e02a7e9cab699c008035d8a16cdeeff6e2d29 (diff)
Crocret xml pour Require
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5598 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--library/library.ml6
-rw-r--r--library/library.mli2
2 files changed, 7 insertions, 1 deletions
diff --git a/library/library.ml b/library/library.ml
index e692a5761..82c1b600d 100644
--- a/library/library.ml
+++ b/library/library.ml
@@ -554,6 +554,9 @@ let (in_require, out_require) =
export_function = export_require;
classify_function = (fun (_,o) -> Anticipate o) }
+let xml_require = ref (fun d -> ())
+let set_xml_require f = xml_require := f
+
let require_library spec qidl export =
(*
if sections_are_opened () && Options.verbose () then
@@ -571,7 +574,8 @@ let require_library spec qidl export =
end
else
add_anonymous_leaf (in_require (modrefl,Some export));
- add_frozen_state ()
+ if !Options.xml_export then List.iter !xml_require modrefl;
+ add_frozen_state ()
let require_library_from_file spec idopt file export =
let modref = rec_intern_library_from_file idopt file in
diff --git a/library/library.mli b/library/library.mli
index e02cb135c..f7937fc07 100644
--- a/library/library.mli
+++ b/library/library.mli
@@ -51,6 +51,8 @@ val require_library :
val require_library_from_file :
bool option -> identifier option -> System.physical_path -> bool -> unit
+val set_xml_require : (dir_path -> unit) -> unit
+
(*s [save_library_to s f] saves the current environment as a library [s]
in the file [f]. *)