`sig
module Raw :
sig
type cp =
String of string
| Int of int
| Float of float
| List of Config_file.Raw.cp list
| Tuple of Config_file.Raw.cp list
| Section of (string * Config_file.Raw.cp) list
val of_string : string -> Config_file.Raw.cp
val to_channel : Stdlib.out_channel -> Config_file.Raw.cp -> unit
end
type 'a wrappers = {
to_raw : 'a -> Config_file.Raw.cp;
of_raw : Config_file.Raw.cp -> 'a;
}
exception Wrong_type of (Stdlib.out_channel -> unit)
class type ['a] cp =
object
method add_hook : ('a -> 'a -> unit) -> unit
method get : 'a
method get_default : 'a
method get_default_formatted : Stdlib.Format.formatter -> unit
method get_formatted : Stdlib.Format.formatter -> unit
method get_help : string
method get_help_formatted : Stdlib.Format.formatter -> unit
method get_name : string list
method get_short_name : string option
method get_spec : Stdlib.Arg.spec
method reset : unit
method set : 'a -> unit
method set_raw : Config_file.Raw.cp -> unit
method set_short_name : string -> unit
end
type groupable_cp =
< get_default_formatted : Stdlib.Format.formatter -> unit;
get_formatted : Stdlib.Format.formatter -> unit; get_help : string;
get_help_formatted : Stdlib.Format.formatter -> unit;
get_name : string list; get_short_name : string option;
get_spec : Stdlib.Arg.spec; reset : unit;
set_raw : Config_file.Raw.cp -> unit >
exception Double_name
exception Missing_cp of Config_file.groupable_cp
class group :
object
method add : 'a Config_file.cp -> unit
method command_line_args :
section_separator:string -> (string * Stdlib.Arg.spec * string) list
method read :
?obsoletes:string ->
?no_default:bool ->
?on_type_error:(Config_file.groupable_cp ->
Config_file.Raw.cp ->
(Stdlib.out_channel -> unit) ->
string -> Stdlib.in_channel -> unit) ->
string -> unit
method read_string :
?obsoletes:string ->
?no_default:bool ->
?on_type_error:(Config_file.groupable_cp ->
Config_file.Raw.cp ->
(Stdlib.out_channel -> unit) -> string -> unit) ->
string -> unit
method write : ?with_help:bool -> string -> unit
end
class int_cp :
?group:Config_file.group ->
string list -> ?short_name:string -> int -> string -> [int] cp
class float_cp :
?group:Config_file.group ->
string list -> ?short_name:string -> float -> string -> [float] cp
class bool_cp :
?group:Config_file.group ->
string list -> ?short_name:string -> bool -> string -> [bool] cp
class string_cp :
?group:Config_file.group ->
string list -> ?short_name:string -> string -> string -> [string] cp
class ['a] list_cp :
'a Config_file.wrappers ->
?group:Config_file.group ->
string list -> ?short_name:string -> 'a list -> string -> ['a list] cp
class ['a] option_cp :
'a Config_file.wrappers ->
?group:Config_file.group ->
string list ->
?short_name:string -> 'a option -> string -> ['a option] cp
class ['a] enumeration_cp :
(string * 'a) list ->
?group:Config_file.group ->
string list -> ?short_name:string -> 'a -> string -> ['a] cp
class ['a, 'b] tuple2_cp :
'a Config_file.wrappers ->
'b Config_file.wrappers ->
?group:Config_file.group ->
string list -> ?short_name:string -> 'a * 'b -> string -> ['a * 'b] cp
class ['a, 'b, 'c] tuple3_cp :
'a Config_file.wrappers ->
'b Config_file.wrappers ->
'c Config_file.wrappers ->
?group:Config_file.group ->
string list ->
?short_name:string -> 'a * 'b * 'c -> string -> ['a * 'b * 'c] cp
class ['a, 'b, 'c, 'd] tuple4_cp :
'a Config_file.wrappers ->
'b Config_file.wrappers ->
'c Config_file.wrappers ->
'd Config_file.wrappers ->
?group:Config_file.group ->
string list ->
?short_name:string ->
'a * 'b * 'c * 'd -> string -> ['a * 'b * 'c * 'd] cp
class string2_cp :
?group:Config_file.group ->
string list ->
?short_name:string ->
string * string -> string -> [string, string] tuple2_cp
class font_cp :
?group:Config_file.group ->
string list -> ?short_name:string -> string -> string -> string_cp
class filename_cp :
?group:Config_file.group ->
string list -> ?short_name:string -> string -> string -> string_cp
val int_wrappers : int Config_file.wrappers
val float_wrappers : float Config_file.wrappers
val bool_wrappers : bool Config_file.wrappers
val string_wrappers : string Config_file.wrappers
val list_wrappers : 'a Config_file.wrappers -> 'a list Config_file.wrappers
val option_wrappers :
'a Config_file.wrappers -> 'a option Config_file.wrappers
val enumeration_wrappers : (string * 'a) list -> 'a Config_file.wrappers
val tuple2_wrappers :
'a Config_file.wrappers ->
'b Config_file.wrappers -> ('a * 'b) Config_file.wrappers
val tuple3_wrappers :
'a Config_file.wrappers ->
'b Config_file.wrappers ->
'c Config_file.wrappers -> ('a * 'b * 'c) Config_file.wrappers
val tuple4_wrappers :
'a Config_file.wrappers ->
'b Config_file.wrappers ->
'c Config_file.wrappers ->
'd Config_file.wrappers -> ('a * 'b * 'c * 'd) Config_file.wrappers
class ['a] cp_custom_type :
'a Config_file.wrappers ->
?group:Config_file.group ->
string list -> ?short_name:string -> 'a -> string -> ['a] cp
type 'a option_class
type 'a option_record
type options_file
val create_options_file : string -> Config_file.options_file
val set_options_file : Config_file.options_file -> string -> unit
val load : Config_file.options_file -> unit
val append : Config_file.options_file -> string -> unit
val save : Config_file.options_file -> unit
val save_with_help : Config_file.options_file -> unit
val option_hook : 'a Config_file.option_record -> (unit -> unit) -> unit
val string_option : string Config_file.option_class
val color_option : string Config_file.option_class
val font_option : string Config_file.option_class
val int_option : int Config_file.option_class
val bool_option : bool Config_file.option_class
val float_option : float Config_file.option_class
val string2_option : (string * string) Config_file.option_class
val option_option :
'a Config_file.option_class -> 'a option Config_file.option_class
val list_option :
'a Config_file.option_class -> 'a list Config_file.option_class
val sum_option : (string * 'a) list -> 'a Config_file.option_class
val tuple2_option :
'a Config_file.option_class * 'b Config_file.option_class ->
('a * 'b) Config_file.option_class
val tuple3_option :
'a Config_file.option_class * 'b Config_file.option_class *
'c Config_file.option_class -> ('a * 'b * 'c) Config_file.option_class
val tuple4_option :
'a Config_file.option_class * 'b Config_file.option_class *
'c Config_file.option_class * 'd Config_file.option_class ->
('a * 'b * 'c * 'd) Config_file.option_class
val ( !! ) : 'a Config_file.option_record -> 'a
val ( =:= ) : 'a Config_file.option_record -> 'a -> unit
val shortname : 'a Config_file.option_record -> string
val get_help : 'a Config_file.option_record -> string
type option_value =
Module of Config_file.option_module
| StringValue of string
| IntValue of int
| FloatValue of float
| List of Config_file.option_value list
| SmallList of Config_file.option_value list
and option_module = (string * Config_file.option_value) list
val define_option_class :
string ->
(Config_file.option_value -> 'a) ->
('a -> Config_file.option_value) -> 'a Config_file.option_class
val to_value :
'a Config_file.option_class -> 'a -> Config_file.option_value
val from_value :
'a Config_file.option_class -> Config_file.option_value -> 'a
val value_to_string : Config_file.option_value -> string
val string_to_value : string -> Config_file.option_value
val value_to_int : Config_file.option_value -> int
val int_to_value : int -> Config_file.option_value
val bool_of_string : string -> bool
val value_to_bool : Config_file.option_value -> bool
val bool_to_value : bool -> Config_file.option_value
val value_to_float : Config_file.option_value -> float
val float_to_value : float -> Config_file.option_value
val value_to_string2 : Config_file.option_value -> string * string
val string2_to_value : string * string -> Config_file.option_value
val value_to_list :
(Config_file.option_value -> 'a) -> Config_file.option_value -> 'a list
val list_to_value :
('a -> Config_file.option_value) -> 'a list -> Config_file.option_value
end`