| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
type option_name = string list |
| 49 |
|
| 50 |
type _ option_kind = |
| 51 |
| BoolKind : bool option_kind |
| 52 |
| IntKind : int option option_kind |
| 53 |
| StringKind : string option_kind |
| 54 |
| StringOptKind : string option option_kind |
| 55 |
|
| 56 |
type option_locality = OptDefault | OptLocal | OptExport | OptGlobal |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
module MakeStringTable : |
| 69 |
functor |
| 70 |
(_ : sig |
| 71 |
val key : option_name |
| 72 |
val title : string |
| 73 |
val member_message : string -> bool -> Pp.t |
| 74 |
end) -> |
| 75 |
sig |
| 76 |
val v : unit -> CString.Set.t |
| 77 |
val active : string -> bool |
| 78 |
end |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
module type RefConvertArg = sig |
| 91 |
type t |
| 92 |
module Set : CSig.USetS with type elt = t |
| 93 |
val encode : Environ.env -> Libnames.qualid -> t |
| 94 |
val subst : Mod_subst.substitution -> t -> t |
| 95 |
|
| 96 |
val check_local : Libobject.locality -> t -> unit |
| 97 |
val discharge : t -> t |
| 98 |
|
| 99 |
|
| 100 |
val printer : t -> Pp.t |
| 101 |
val key : option_name |
| 102 |
val title : string |
| 103 |
val member_message : t -> bool -> Pp.t |
| 104 |
end |
| 105 |
|
| 106 |
module MakeRefTable : |
| 107 |
functor (A : RefConvertArg) -> |
| 108 |
sig |
| 109 |
val v : unit -> A.Set.t |
| 110 |
val active : A.t -> bool |
| 111 |
val set : Libobject.locality -> A.t -> bool -> unit |
| 112 |
end |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
type 'a option_sig = { |
| 128 |
optstage : Summary.Stage.t; |
| 129 |
optdepr : Deprecation.t option; |
| 130 |
|
| 131 |
optkey : option_name; |
| 132 |
|
| 133 |
optread : unit -> 'a; |
| 134 |
optwrite : 'a -> unit |
| 135 |
} |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
val declare_option : ?preprocess:('a -> 'a) -> ?no_summary:bool -> |
| 146 |
kind:'a option_kind -> 'a option_sig -> unit |
| 147 |
|
| 148 |
val declare_append_only_option : ?preprocess:(string -> string) -> sep:string -> |
| 149 |
string option_sig -> unit |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
type 'a getter = { get : unit -> 'a } |
| 156 |
|
| 157 |
type 'a opt_decl = ?stage:Summary.Stage.t -> ?depr:Deprecation.t -> key:option_name -> value:'a -> unit -> 'a getter |
| 158 |
|
| 159 |
val declare_interpreted_option_and_ref : |
| 160 |
('a -> 'b) -> ('b -> 'a) -> |
| 161 |
stage:Summary.Stage.t -> |
| 162 |
?depr:Deprecation.t -> |
| 163 |
key:option_name -> |
| 164 |
'a option_kind -> |
| 165 |
value:'b -> |
| 166 |
unit -> |
| 167 |
'b getter |
| 168 |
|
| 169 |
val declare_int_option_and_ref : int opt_decl |
| 170 |
val declare_intopt_option_and_ref : int option opt_decl |
| 171 |
val declare_nat_option_and_ref : int opt_decl |
| 172 |
val declare_bool_option_and_ref : bool opt_decl |
| 173 |
val declare_string_option_and_ref : string opt_decl |
| 174 |
val declare_stringopt_option_and_ref : string option opt_decl |
| 175 |
val declare_interpreted_string_option_and_ref : (string -> 'a) -> ('a -> string) -> 'a opt_decl |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
module OptionMap : CSig.MapS with type key = option_name |
| 180 |
|
| 181 |
type 'a table_of_A = { |
| 182 |
add : Environ.env -> Libobject.locality -> 'a -> unit; |
| 183 |
remove : Environ.env -> Libobject.locality -> 'a -> unit; |
| 184 |
mem : Environ.env -> 'a -> unit; |
| 185 |
print : unit -> unit; |
| 186 |
} |
| 187 |
|
| 188 |
val get_string_table : |
| 189 |
option_name -> string table_of_A |
| 190 |
val get_ref_table : |
| 191 |
option_name -> Libnames.qualid table_of_A |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
val set_int_option_value_gen : ?locality:option_locality -> ?stage:Summary.Stage.t -> option_name -> int option -> unit |
| 197 |
val set_bool_option_value_gen : ?locality:option_locality -> ?stage:Summary.Stage.t -> option_name -> bool -> unit |
| 198 |
val set_string_option_value_gen : ?locality:option_locality -> ?stage:Summary.Stage.t -> option_name -> string -> unit |
| 199 |
val unset_option_value_gen : ?locality:option_locality -> ?stage:Summary.Stage.t -> option_name -> unit |
| 200 |
|
| 201 |
val set_int_option_value : ?stage:Summary.Stage.t -> option_name -> int option -> unit |
| 202 |
val set_bool_option_value : ?stage:Summary.Stage.t -> option_name -> bool -> unit |
| 203 |
val set_string_option_value : ?stage:Summary.Stage.t -> option_name -> string -> unit |
| 204 |
|
| 205 |
val print_option_value : option_name -> unit |
| 206 |
|
| 207 |
type option_value = |
| 208 |
| BoolValue of bool |
| 209 |
| IntValue of int option |
| 210 |
| StringValue of string |
| 211 |
| StringOptValue of string option |
| 212 |
|
| 213 |
type table_value = |
| 214 |
| StringRefValue of string |
| 215 |
| QualidRefValue of Libnames.qualid |
| 216 |
|
| 217 |
|
| 218 |
val get_option_value : option_name -> (unit -> option_value) option |
| 219 |
|
| 220 |
type 'a check_and_cast = { check_and_cast : 'b. 'a -> 'b option_kind -> 'b } |
| 221 |
|
| 222 |
val set_option_value : ?locality:option_locality -> ?stage:Summary.Stage.t -> |
| 223 |
'a check_and_cast -> option_name -> 'a -> unit |
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
type option_state = { |
| 231 |
opt_depr : Deprecation.t option; |
| 232 |
opt_value : option_value; |
| 233 |
} |
| 234 |
|
| 235 |
val get_tables : unit -> option_state OptionMap.t |
| 236 |
val print_tables : unit -> Pp.t |
| 237 |
|
| 238 |
type iter_table_aux = { aux : 'a. 'a table_of_A -> Environ.env -> 'a -> unit } |
| 239 |
val iter_table : Environ.env -> iter_table_aux -> option_name -> table_value list -> unit |
| 240 |
|
| 241 |
val error_undeclared_key : option_name -> 'a |
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
val declare_int_option : ?preprocess:(int option -> int option) -> |
| 246 |
int option option_sig -> unit |
| 247 |
val declare_bool_option : ?preprocess:(bool -> bool) -> |
| 248 |
bool option_sig -> unit |
| 249 |
val declare_string_option: ?preprocess:(string -> string) -> |
| 250 |
string option_sig -> unit |
| 251 |
val declare_stringopt_option: ?preprocess:(string option -> string option) -> |
| 252 |
string option option_sig -> unit |