From 97fefe1fcca363a1317e066e7f4b99b9c1e9987b Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Thu, 12 Jan 2012 16:02:20 +0100 Subject: Imported Upstream version 8.4~beta --- library/goptions.mli | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'library/goptions.mli') diff --git a/library/goptions.mli b/library/goptions.mli index 78c4d8e6..d25c1202 100644 --- a/library/goptions.mli +++ b/library/goptions.mli @@ -1,16 +1,14 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* 'a +type option_name = Goptionstyp.option_name -(*s Tables. *) +(** {6 Tables. } *) -(* The functor [MakeStringTable] declares a table containing objects +(** The functor [MakeStringTable] declares a table containing objects of type [string]; the function [member_message] say what to print when invoking the "Test Toto Titi foo." command; at the end [title] is the table name printed when invoking the "Print Toto Titi." @@ -85,7 +76,7 @@ sig val elements : unit -> string list end -(* The functor [MakeRefTable] declares a new table of objects of type +(** The functor [MakeRefTable] declares a new table of objects of type [A.t] practically denoted by [reference]; the encoding function [encode : reference -> A.t] is typically a globalization function, possibly with some restriction checks; the function @@ -113,21 +104,26 @@ module MakeRefTable : end -(*s Options. *) +(** {6 Options. } *) -(* These types and function are for declaring a new option of name [key] +(** These types and function are for declaring a new option of name [key] and access functions [read] and [write]; the parameter [name] is the option name used when printing the option value (command "Print Toto Titi." *) type 'a option_sig = { optsync : bool; + (** whether the option is synchronous w.r.t to the section/module system. *) + optdepr : bool; + (** whether the option is DEPRECATED *) optname : string; + (** a short string describing the option *) optkey : option_name; + (** the low-level name of this option *) optread : unit -> 'a; optwrite : 'a -> unit } -(* When an option is declared synchronous ([optsync] is [true]), the output is +(** When an option is declared synchronous ([optsync] is [true]), the output is a synchronous write function. Otherwise it is [optwrite] *) type 'a write_function = 'a -> unit @@ -137,7 +133,9 @@ val declare_bool_option : bool option_sig -> bool write_function val declare_string_option: string option_sig -> string write_function -(*s Special functions supposed to be used only in vernacentries.ml *) +(** {6 Special functions supposed to be used only in vernacentries.ml } *) + +module OptionMap : Map.S with type key = option_name val get_string_table : option_name -> @@ -153,7 +151,8 @@ val get_ref_table : mem : reference -> unit; print : unit > -(* The first argument is a locality flag. [Some true] = "Local", [Some false]="Global". *) +(** The first argument is a locality flag. + [Some true] = "Local", [Some false]="Global". *) val set_int_option_value_gen : bool option -> option_name -> int option -> unit val set_bool_option_value_gen : bool option -> option_name -> bool -> unit val set_string_option_value_gen : bool option -> option_name -> string -> unit @@ -165,5 +164,7 @@ val set_string_option_value : option_name -> string -> unit val print_option_value : option_name -> unit +val get_tables : unit -> Goptionstyp.option_state OptionMap.t val print_tables : unit -> unit +val error_undeclared_key : option_name -> 'a -- cgit v1.2.3