Module Release_config_values

module Release_config_values: sig .. end
This module defines the type of Release_config configuration values and helper functions to extract OCaml values from Release_config_values.values and to specify default values for configuration directives.

type value = [ `Bool of bool
| `Float of float
| `Int of int
| `List of value list
| `Log_level of Lwt_log.level
| `Regexp of Str.regexp
| `Str of string ]
The type of configuration values. Literal newline ('\n') characters are allowed inside strings. In regular expressions, newlines are ignored along with any following whitespace (' ', '\t') characters.
type validation = value -> [ `Invalid of string | `Valid ] 
The type of validation functions.

Conversion to OCaml values

val bool_value : [> `Bool of 'a ] -> 'a
val int_value : [> `Int of 'a ] -> 'a
val float_value : [> `Float of 'a ] -> 'a
val string_value : [> `Str of 'a ] -> 'a
val regexp_value : [> `Regexp of 'a ] -> 'a
val log_level_value : [> `Log_level of 'a ] -> 'a
val list_value : string -> ('a -> 'b) -> [> `List of 'a list ] -> 'b list
val bool_list_value : [> `List of [> `Bool of 'a ] list ] -> 'a list
val int_list_value : [> `List of [> `Int of 'a ] list ] -> 'a list
val float_list_value : [> `List of [> `Float of 'a ] list ] -> 'a list
val string_list_value : [> `List of [> `Str of 'a ] list ] -> 'a list
val log_level_list_value : [> `List of [> `Log_level of 'a ] list ] -> 'a list

Helpers for specifying default values of configuration directives

val default_bool : bool -> [> `Bool of bool ] option
val default_int : int -> [> `Int of int ] option
val default_float : float -> [> `Float of float ] option
val default_string : string -> [> `Str of string ] option
val default_regexp : Str.regexp -> [> `Regexp of Str.regexp ] option
val default_log_level : Lwt_log.level -> [> `Log_level of Lwt_log.level ] option
val default_bool_list : bool list -> [> `List of [> `Bool of bool ] list ] option
val default_int_list : int list -> [> `List of [> `Int of int ] list ] option
val default_float_list : float list -> [> `List of [> `Float of float ] list ] option
val default_string_list : string list -> [> `List of [> `Str of string ] list ] option