<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Release_config_global.html"> <link rel="next" href="Release_config_validations.html"> <link rel="Up" href="index.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Release_config" rel="Chapter" href="Release_config.html"> <link title="Release_config_lexer" rel="Chapter" href="Release_config_lexer.html"> <link title="Release_config_parser" rel="Chapter" href="Release_config_parser.html"> <link title="Release_config_global" rel="Chapter" href="Release_config_global.html"> <link title="Release_config_values" rel="Chapter" href="Release_config_values.html"> <link title="Release_config_validations" rel="Chapter" href="Release_config_validations.html"><link title="Conversion to OCaml values" rel="Section" href="#6_ConversiontoOCamlvalues"> <link title="Helpers for specifying default values of configuration directives" rel="Section" href="#6_Helpersforspecifyingdefaultvaluesofconfigurationdirectives"> <title>Release_config_values</title> </head> <body> <div class="navbar"><a class="pre" href="Release_config_global.html" title="Release_config_global">Previous</a> <a class="up" href="index.html" title="Index">Up</a> <a class="post" href="Release_config_validations.html" title="Release_config_validations">Next</a> </div> <h1>Module <a href="type_Release_config_values.html">Release_config_values</a></h1> <pre><span class="keyword">module</span> Release_config_values: <code class="code">sig</code> <a href="Release_config_values.html">..</a> <code class="code">end</code></pre><div class="info module top"> This module defines the type of <a href="Release_config.html"><code class="code">Release_config</code></a> configuration values and helper functions to extract OCaml values from <a href="Release_config_values.html#TYPEvalue"><code class="code">Release_config_values.value</code></a>s and to specify default values for configuration directives.<br> </div> <hr width="100%"> <pre><span id="TYPEvalue"><span class="keyword">type</span> <code class="type"></code>value</span> = <code class="type">[ `Bool of bool<br> | `Float of float<br> | `Int of int<br> | `List of <a href="Release_config_values.html#TYPEvalue">value</a> list<br> | `Log_level of Lwt_log.level<br> | `Regexp of Str.regexp<br> | `Str of string ]</code> </pre> <div class="info "> The type of configuration values. Literal newline (<code class="code">'\n'</code>) characters are allowed inside strings. In regular expressions, newlines are ignored along with any following whitespace (<code class="code">' '</code>, <code class="code">'\t'</code>) characters.<br> </div> <pre><span id="TYPEvalidation"><span class="keyword">type</span> <code class="type"></code>validation</span> = <code class="type"><a href="Release_config_values.html#TYPEvalue">value</a> -> [ `Invalid of string | `Valid ]</code> </pre> <div class="info "> The type of validation functions.<br> </div> <br> <h6 id="6_ConversiontoOCamlvalues">Conversion to OCaml values</h6><br> <pre><span id="VALbool_value"><span class="keyword">val</span> bool_value</span> : <code class="type">[> `Bool of 'a ] -> 'a</code></pre> <pre><span id="VALint_value"><span class="keyword">val</span> int_value</span> : <code class="type">[> `Int of 'a ] -> 'a</code></pre> <pre><span id="VALfloat_value"><span class="keyword">val</span> float_value</span> : <code class="type">[> `Float of 'a ] -> 'a</code></pre> <pre><span id="VALstring_value"><span class="keyword">val</span> string_value</span> : <code class="type">[> `Str of 'a ] -> 'a</code></pre> <pre><span id="VALregexp_value"><span class="keyword">val</span> regexp_value</span> : <code class="type">[> `Regexp of 'a ] -> 'a</code></pre> <pre><span id="VALlog_level_value"><span class="keyword">val</span> log_level_value</span> : <code class="type">[> `Log_level of 'a ] -> 'a</code></pre> <pre><span id="VALlist_value"><span class="keyword">val</span> list_value</span> : <code class="type">string -> ('a -> 'b) -> [> `List of 'a list ] -> 'b list</code></pre> <pre><span id="VALbool_list_value"><span class="keyword">val</span> bool_list_value</span> : <code class="type">[> `List of [> `Bool of 'a ] list ] -> 'a list</code></pre> <pre><span id="VALint_list_value"><span class="keyword">val</span> int_list_value</span> : <code class="type">[> `List of [> `Int of 'a ] list ] -> 'a list</code></pre> <pre><span id="VALfloat_list_value"><span class="keyword">val</span> float_list_value</span> : <code class="type">[> `List of [> `Float of 'a ] list ] -> 'a list</code></pre> <pre><span id="VALstring_list_value"><span class="keyword">val</span> string_list_value</span> : <code class="type">[> `List of [> `Str of 'a ] list ] -> 'a list</code></pre> <pre><span id="VALlog_level_list_value"><span class="keyword">val</span> log_level_list_value</span> : <code class="type">[> `List of [> `Log_level of 'a ] list ] -> 'a list</code></pre><br> <h6 id="6_Helpersforspecifyingdefaultvaluesofconfigurationdirectives">Helpers for specifying default values of configuration directives</h6><br> <pre><span id="VALdefault_bool"><span class="keyword">val</span> default_bool</span> : <code class="type">bool -> [> `Bool of bool ] option</code></pre> <pre><span id="VALdefault_int"><span class="keyword">val</span> default_int</span> : <code class="type">int -> [> `Int of int ] option</code></pre> <pre><span id="VALdefault_float"><span class="keyword">val</span> default_float</span> : <code class="type">float -> [> `Float of float ] option</code></pre> <pre><span id="VALdefault_string"><span class="keyword">val</span> default_string</span> : <code class="type">string -> [> `Str of string ] option</code></pre> <pre><span id="VALdefault_regexp"><span class="keyword">val</span> default_regexp</span> : <code class="type">Str.regexp -> [> `Regexp of Str.regexp ] option</code></pre> <pre><span id="VALdefault_log_level"><span class="keyword">val</span> default_log_level</span> : <code class="type">Lwt_log.level -> [> `Log_level of Lwt_log.level ] option</code></pre> <pre><span id="VALdefault_bool_list"><span class="keyword">val</span> default_bool_list</span> : <code class="type">bool list -> [> `List of [> `Bool of bool ] list ] option</code></pre> <pre><span id="VALdefault_int_list"><span class="keyword">val</span> default_int_list</span> : <code class="type">int list -> [> `List of [> `Int of int ] list ] option</code></pre> <pre><span id="VALdefault_float_list"><span class="keyword">val</span> default_float_list</span> : <code class="type">float list -> [> `List of [> `Float of float ] list ] option</code></pre> <pre><span id="VALdefault_string_list"><span class="keyword">val</span> default_string_list</span> : <code class="type">string list -> [> `List of [> `Str of string ] list ] option</code></pre></body></html>