aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2010-07-23 10:00:11 +0000
committerherbelin2010-07-23 10:00:11 +0000
commite8a6cf51f9671c92b90cc84473d84526e69173c8 (patch)
tree19ee543495f1fe08f6d68d268d5cd957aea8e760
parentf11fc1871babffd64e9d3be99197f91a0dfc8b69 (diff)
Some fine-tuning after removal of automatic imports of coercions in r13310
- Moved Global Set from Keep to Substitute to ensure it is activated in real time and not only after the main parts of the module - Renamed Importation into Import in option name - Made "Print Libraries" prints the modules in the importation order (which is the most relevant order for non-commutative declarations) instead of load order git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13318 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--library/goptions.ml2
-rw-r--r--pretyping/classops.ml4
-rw-r--r--toplevel/vernacentries.ml4
3 files changed, 6 insertions, 4 deletions
diff --git a/library/goptions.ml b/library/goptions.ml
index 75771a52ec..5b18195987 100644
--- a/library/goptions.ml
+++ b/library/goptions.ml
@@ -249,7 +249,7 @@ let declare_option cast uncast
let (gdecl_obj,_) = (* "Global": survives section and modules. *)
declare_object {(default_object ("G "^nickname key)) with
cache_function = (fun (_,v) -> write v);
- classify_function = (fun v -> Keep v);
+ classify_function = (fun v -> Substitute v);
discharge_function = (fun (_,v) -> Some v);
load_function = (fun _ (_,v) -> write v)}
in
diff --git a/pretyping/classops.ml b/pretyping/classops.ml
index 282f181ebb..9fd94c75b8 100644
--- a/pretyping/classops.ml
+++ b/pretyping/classops.ml
@@ -342,8 +342,8 @@ open Goptions
let _ =
declare_bool_option
{ optsync = true;
- optname = "automatic importation of coercions";
- optkey = ["Automatic";"Coercions";"Importation"];
+ optname = "automatic import of coercions";
+ optkey = ["Automatic";"Coercions";"Import"];
optread = (fun () -> !automatically_import_coercions);
optwrite = (:=) automatically_import_coercions }
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index 05795566ae..22bfde6f18 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -174,7 +174,9 @@ let print_loadpath dir =
let print_modules () =
let opened = Library.opened_libraries ()
and loaded = Library.loaded_libraries () in
- let loaded_opened = list_intersect loaded opened
+ (* we intersect over opened to preserve the order of opened since *)
+ (* non-commutative operations (e.g. visibility) are done at import time *)
+ let loaded_opened = list_intersect opened loaded
and only_loaded = list_subtract loaded opened in
str"Loaded and imported library files: " ++
pr_vertical_list pr_dirpath loaded_opened ++ fnl () ++