diff options
| author | vsiles | 2010-06-29 09:41:09 +0000 |
|---|---|---|
| committer | vsiles | 2010-06-29 09:41:09 +0000 |
| commit | 4dce356eacb7b9804c2e2398447dbbc3b0dc1383 (patch) | |
| tree | 14f44a67e0d0ec5e835792ec238ac2a1ed7a59f5 /library/declare.ml | |
| parent | 7e2f953c3c19904616c43990fada92e762aadec9 (diff) | |
change the flag "internal" in declare/ind_tables from bool to
a 3 state type to allow:
* KernelVerbose / KernelSilent : handle the display of messages launch by Coq
* UserVerbose : handle the display of messages launch by user actions
Coq will still behaves the same way (TODOs in the code mark the places
where we can now change the behaviour). I'll remove them in a few days
when we'll have agreed on the correct behaviour.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13217 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/declare.ml')
| -rw-r--r-- | library/declare.ml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/library/declare.ml b/library/declare.ml index b571ecf3a4..2886c63d85 100644 --- a/library/declare.ml +++ b/library/declare.ml @@ -25,11 +25,17 @@ open Cooking open Decls open Decl_kinds +(** flag for internal message display *) +type internal_flag = + | KernelVerbose (* kernel action, a message is displayed *) + | KernelSilent (* kernel action, no message is displayed *) + | UserVerbose (* user action, a message is displayed *) + (** XML output hooks *) let xml_declare_variable = ref (fun (sp:object_name) -> ()) -let xml_declare_constant = ref (fun (sp:bool * constant)-> ()) -let xml_declare_inductive = ref (fun (sp:bool * object_name) -> ()) +let xml_declare_constant = ref (fun (sp:internal_flag * constant)-> ()) +let xml_declare_inductive = ref (fun (sp:internal_flag * object_name) -> ()) let if_xml f x = if !Flags.xml_export then f x else () @@ -172,8 +178,10 @@ let declare_constant_gen internal id (cd,kind) = !xml_declare_constant (internal,kn); kn -let declare_internal_constant = declare_constant_gen true -let declare_constant = declare_constant_gen false +(* TODO: add a third function to distinguish between KernelVerbose + * and user Verbose *) +let declare_internal_constant = declare_constant_gen KernelSilent +let declare_constant = declare_constant_gen UserVerbose (** Declaration of inductive blocks *) |
