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