123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788moduletypeTomlNumber=sigtypeinttypefloatvalint_of_string:string->intvalint_to_string:int->stringvalfloat_of_string:string->floatvalfloat_to_string:float->stringvalint_of_float:float->intvalfloat_of_int:int->floatvalint_of_boolean:bool->intvalint_to_boolean:int->boolvalfloat_of_boolean:bool->floatvalfloat_to_boolean:float->boolendmoduletypeTomlDate=sigtypetvallocal_time_of_string:string->tvallocal_date_of_string:string->tvallocal_datetime_of_string:string->tvaloffset_datetime_of_string:string->tvallocal_time_to_string:t->stringvallocal_date_to_string:t->stringvallocal_datetime_to_string:t->stringvaloffset_datetime_to_string:t->stringendmoduletypeTomlImplementation=sigtypetoml_integertypetoml_floattypetoml_date(** {2 Exceptions} *)(** Raised when a table field does not exist. *)exceptionKey_errorofstring(** Raised when a TOML value type is not what an accessor
or another function expects.
*)exceptionType_errorofstring(** Raised when the parser encounters invalid TOML syntax.
The first member of the tuple is the source file position
(line and column).
*)exceptionParse_errorof((int*int)option*string)(** Raised when a table field or a table name is defined twice,
which is prohibited to the TOML standard. *)exceptionDuplicate_keyofstringtypet=|TomlStringofstring|TomlIntegeroftoml_integer|TomlFloatoftoml_float|TomlBooleanofbool|TomlOffsetDateTimeoftoml_date|TomlLocalDateTimeoftoml_date|TomlLocalDateoftoml_date|TomlLocalTimeoftoml_date|TomlArrayoftlist|TomlTableof(string*t)list|TomlInlineTableof(string*t)list|TomlTableArrayoftlistmodulePrinter:sigvalto_string:?indent_width:int->?indent_character:char->?indent_subtables:bool->?newline_before_table:bool->?collapse_tables:bool->?force_table_arrays:bool->t->stringvalto_channel:?indent_width:int->?indent_character:char->?indent_subtables:bool->?newline_before_table:bool->?collapse_tables:bool->?force_table_arrays:bool->out_channel->t->unitendmoduleParser:sig(** Reads TOML from a file. May raise {!Parse_error} or {!Stdlib.Sys_error}. *)valfrom_file:string->t(** Reads TOML from an input channel. May raise {!Parse_error} or {!Stdlib.Sys_error}. *)valfrom_channel:in_channel->t(** Reads TOML from a string. May raise {!Parse_error} or {!Stdlib.Sys_error}. *)valfrom_string:string->t(** Like {!from_file}, but handles both {!Parse_error} or {!Stdlib.Sys_error} exceptions
and wraps the error message in {!Stdlib.result}. *)valfrom_file_result:string->(t,string)resultvalfrom_channel_result:in_channel->(t,string)resultvalfrom_string_result:string->(t,string)result(** Converts the value attached to a {!Parse_error} exception
to an error message string.
*)valformat_parse_error:(int*int)option->string->stringend(** {2 Constructors}
Constructors create TOML values from OCaml values.
*)valstring:string->tvalinteger:toml_integer->tvalfloat:toml_float->tvalboolean:bool->tvaloffset_datetime:toml_date->tvallocal_datetime:toml_date->tvallocal_date:toml_date->tvallocal_time:toml_date->tvalarray:tlist->tvaltable:(string*t)list->tvalinline_table:(string*t)list->t(** {2 Accessors}
Accessors can be used by themselves on TOML values, or passed to
high-level interface functions such as {!find}.
By default they expect a strict match, e.g. {!get_string}
fails on values other than [TomlString _]. However, they all
provide a boolean [~strict] argument that enables type conversion when set to [false].
Not all types can be converted between each other, so [~strict:false]
does not prevent all type errors.
All accessors will raise {!Type_error} exception if type conversion
is disabled or fails. High-level interface functions handle those exceptions,
so you don't need to handle it.
If you want to use accessors directly on TOML values and you want option or result
values instead of exceptions, you can use {!get_opt} and {!get_result} combinators.
*)(** The trivial accessor that returns the unwrapped TOML value. *)valget_value:t->tvalget_table:t->(string*t)list(** Unwraps a table and applies an accessor to the values of its fields,
useful for unwrapping tables with homogenous field types in a single step. *)valget_table_values:(t->'a)->t->(string*'a)list(** Converts a TOML array to a list of OCaml values by applying
an accessor function to each of them.
For example, if you want to retrieve an array of strings,
you can use [get_array get_string toml_value].
In non-strict mode, forces a value [x] to a single-item array [[x]].
Note that the [strict] flag is not passed to the accessor.
If you want the accessor to also attempt type conversion on the array values,
you should specify it explicitly:
[get_array ~strict:false (get_string ~strict:false) toml_value].
*)valget_array:?strict:bool->(t->'a)->t->'alist(** In non-strict mode, converts integer, float, boolean, and datetime values to strings.
Trying to convert an array or a table to string will raise {!Type_error}.
*)valget_string:?strict:bool->t->string(** In non-strict mode, converts string and boolean values to integers.
Strings are parsed as integers, [true] is converted to 1, [false] is converted to 0,
and floats are truncated.
*)valget_integer:?strict:bool->t->toml_integer(** In non-strict mode, converts string, boolean, and integer values to floats.
*)valget_float:?strict:bool->t->toml_float(** In non-strict mode, converts integer, float, and string values to booleans.
The conversion logic mimics "truth values" in dynamically typed languages.
Empty strings, numeric values 0 (integer) and 0.0 (float), empty arrays and tables
are treated as [false], everything else is [true].
*)valget_boolean:?strict:bool->t->bool(** In non-strict mode, these functions will try to convert strings to dates.
In the default implementation dates are represented as strings,
so the conversion is a no-op.
They will handle the {!Stdlib.Failure} exception raised by string to datetime
conversion functions. Thus if you supply your own datetime module
to the functorial interface, you may want to catch exceptions raised by your
library of choice and re-raise them as [Failure].
*)valget_offset_datetime:?strict:bool->t->toml_datevalget_local_datetime:?strict:bool->t->toml_datevalget_local_date:?strict:bool->t->toml_datevalget_local_time:?strict:bool->t->toml_datevalget_datetime:t->toml_datevalget_date:t->toml_date(** {2 Combinators }
These combinators are mainly useful for unwrapping standalong TOML values by hand.
They handle the {!Type_error} exception and return [None] or [Error msg] when it occurs.
The high-level interface functions handle exceptions raised by accessors themselves.
*)valget_opt:('a->'b)->'a->'boptionvalget_result:('a->'b)->'a->('b,string)result(** {2 High-level interface} *)(** Returns [true] if there is a value at the specified path in a table.
For the purpose of this function, an empty table does exist,
i.e. if you have [foo.bar = {}], then [path_exists t ["foo"; "bar"]] is true.
*)valpath_exists:t->stringlist->bool(** Returns a list of all keys of a table, in their original order.
@raises {!Type_error} is the value is not a table.
*)vallist_table_keys:t->stringlistvallist_table_keys_exn:t->stringlistvallist_table_keys_result:t->(stringlist,string)result(** Looks up a value in a table and unwraps it using an accessor function.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value
is not what the accessor expects.
*)valfind:t->(t->'a)->stringlist->'avalfind_exn:t->(t->'a)->stringlist->'avalfind_opt:t->(t->'a)->stringlist->'aoptionvalfind_or:default:'a->t->(t->'a)->stringlist->'avalfind_result:t->(t->'a)->stringlist->('a,string)result(** Updates a table field at a specified path.
Passing [Some toml_value] inserts a new value or replaces an existing value.
If a key path partially does not exist, additional tables are created as needed.
For example, [update (TomlTable []) ["foo"; "bar"] (Some (TomlString "baz"]))]
will produce [TomlTable [("foo", TomlTable [("bar", TomlString "baz")])]].
The [use_inline_tables] flag determines whether automatically-created missing tables
will be normal or inline tables.
Passing [None] as the argument will delete the field at the specified path.
It's safe to attempt deleting values at paths that don't exist:
there will be no error and the original TOML will be returned unchanged.
*)valupdate:?use_inline_tables:bool->t->stringlist->toption->tvalupdate_result:?use_inline_tables:bool->t->stringlist->toption->(t,string)result(** {3 Utility functions} *)(** Makes a printable representation of a table key path,
for example, [["foo"; "bar baz"; "quux"]] gives [foo."bar baz".quux].
*)valstring_of_path:stringlist->stringmoduleHelpers:sig(** {4 string value lookup} *)(** Looks up an string at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an string
or (when used with [~strict:false], if it cannot be converted to string.
*)valfind_string:?strict:bool->t->stringlist->string(** Alias for {!find_string} *)valfind_string_exn:?strict:bool->t->stringlist->string(** Looks up an string at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an string
or (when used with [~strict:false], if it cannot be converted to string.
*)valfind_string_opt:?strict:bool->t->stringlist->stringoption(** Looks up an string at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an string nor (with [~strict:false])
a value that can be converted to string.
*)valfind_string_result:?strict:bool->t->stringlist->(string,string)result(** {4 string array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not an string, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single string value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of strings at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of strings
or (when used with [~strict:false], if it cannot be converted to an array of strings.
*)valfind_strings:?strict:bool->t->stringlist->stringlist(** Alias for {!find_strings} *)valfind_strings_exn:?strict:bool->t->stringlist->stringlist(** Looks up an array of strings at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an string or an array of strings
or (when used with [~strict:false], if it cannot be converted to an array of strings.
*)valfind_strings_opt:?strict:bool->t->stringlist->stringlistoption(** Looks up an array of strings at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an string or an array of strings, nor (with [~strict:false])
a value that can be converted to an array of strings.
*)valfind_strings_result:?strict:bool->t->stringlist->(stringlist,string)result(** {4 Integer value lookup} *)(** Looks up an integer at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an integer
or (when used with [~strict:false], if it cannot be converted to integer.
*)valfind_integer:?strict:bool->t->stringlist->toml_integer(** Alias for {!find_integer} *)valfind_integer_exn:?strict:bool->t->stringlist->toml_integer(** Looks up an integer at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an integer
or (when used with [~strict:false], if it cannot be converted to integer.
*)valfind_integer_opt:?strict:bool->t->stringlist->toml_integeroption(** Looks up an integer at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an integer nor (with [~strict:false])
a value that can be converted to integer.
*)valfind_integer_result:?strict:bool->t->stringlist->(toml_integer,string)result(** {4 Integer array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not an integer, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single integer value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of integers at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of integers
or (when used with [~strict:false], if it cannot be converted to an array of integers.
*)valfind_integers:?strict:bool->t->stringlist->toml_integerlist(** Alias for {!find_integers} *)valfind_integers_exn:?strict:bool->t->stringlist->toml_integerlist(** Looks up an array of integers at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an integer or an array of integers
or (when used with [~strict:false], if it cannot be converted to an array of integers.
*)valfind_integers_opt:?strict:bool->t->stringlist->toml_integerlistoption(** Looks up an array of integers at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an integer or an array of integers, nor (with [~strict:false])
a value that can be converted to an array of integers.
*)valfind_integers_result:?strict:bool->t->stringlist->(toml_integerlist,string)result(** {4 float value lookup} *)(** Looks up an float at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an float
or (when used with [~strict:false], if it cannot be converted to float.
*)valfind_float:?strict:bool->t->stringlist->toml_float(** Alias for {!find_float} *)valfind_float_exn:?strict:bool->t->stringlist->toml_float(** Looks up an float at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an float
or (when used with [~strict:false], if it cannot be converted to float.
*)valfind_float_opt:?strict:bool->t->stringlist->toml_floatoption(** Looks up an float at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an float nor (with [~strict:false])
a value that can be converted to float.
*)valfind_float_result:?strict:bool->t->stringlist->(toml_float,string)result(** {4 float array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not an float, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single float value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of floats at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of floats
or (when used with [~strict:false], if it cannot be converted to an array of floats.
*)valfind_floats:?strict:bool->t->stringlist->toml_floatlist(** Alias for {!find_floats} *)valfind_floats_exn:?strict:bool->t->stringlist->toml_floatlist(** Looks up an array of floats at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an float or an array of floats
or (when used with [~strict:false], if it cannot be converted to an array of floats.
*)valfind_floats_opt:?strict:bool->t->stringlist->toml_floatlistoption(** Looks up an array of floats at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an float or an array of floats, nor (with [~strict:false])
a value that can be converted to an array of floats.
*)valfind_floats_result:?strict:bool->t->stringlist->(toml_floatlist,string)result(** {4 boolean value lookup} *)(** Looks up a boolean at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not a boolean
or (when used with [~strict:false], if it cannot be converted to boolean.
*)valfind_boolean:?strict:bool->t->stringlist->bool(** Alias for {!find_boolean} *)valfind_boolean_exn:?strict:bool->t->stringlist->bool(** Looks up a boolean at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a boolean
or (when used with [~strict:false], if it cannot be converted to boolean.
*)valfind_boolean_opt:?strict:bool->t->stringlist->booloption(** Looks up a boolean at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a boolean nor (with [~strict:false])
a value that can be converted to boolean.
*)valfind_boolean_result:?strict:bool->t->stringlist->(bool,string)result(** {4 boolean array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not a boolean, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single boolean value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of booleans at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of booleans
or (when used with [~strict:false], if it cannot be converted to an array of booleans.
*)valfind_booleans:?strict:bool->t->stringlist->boollist(** Alias for {!find_booleans} *)valfind_booleans_exn:?strict:bool->t->stringlist->boollist(** Looks up an array of booleans at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a boolean or an array of booleans
or (when used with [~strict:false], if it cannot be converted to an array of booleans.
*)valfind_booleans_opt:?strict:bool->t->stringlist->boollistoption(** Looks up an array of booleans at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a boolean or an array of booleans, nor (with [~strict:false])
a value that can be converted to an array of booleans.
*)valfind_booleans_result:?strict:bool->t->stringlist->(boollist,string)result(** {4 offset_datetime value lookup} *)(** Looks up an offset_datetime at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an offset datetime
or (when used with [~strict:false], if it cannot be converted to offset datetime.
*)valfind_offset_datetime:?strict:bool->t->stringlist->toml_date(** Alias for {!find_offset_datetime} *)valfind_offset_datetime_exn:?strict:bool->t->stringlist->toml_date(** Looks up an offset_datetime at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an offset datetime
or (when used with [~strict:false], if it cannot be converted to offset datetime.
*)valfind_offset_datetime_opt:?strict:bool->t->stringlist->toml_dateoption(** Looks up an offset_datetime at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an offset_datetime nor (with [~strict:false])
a value that can be converted to offset_datetime.
*)valfind_offset_datetime_result:?strict:bool->t->stringlist->(toml_date,string)result(** {4 offset_datetime array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not an offset datetime, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single offset_datetime value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of offset_datetimes at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of offset_datetimes
or (when used with [~strict:false], if it cannot be converted to an array of offset_datetimes.
*)valfind_offset_datetimes:?strict:bool->t->stringlist->toml_datelist(** Alias for {!find_offset_datetimes} *)valfind_offset_datetimes_exn:?strict:bool->t->stringlist->toml_datelist(** Looks up an array of offset_datetimes at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not an offset datetime or an array of offset datetimes
or (when used with [~strict:false], if it cannot be converted to an array of offset datetimes.
*)valfind_offset_datetimes_opt:?strict:bool->t->stringlist->toml_datelistoption(** Looks up an array of offset_datetimes at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither an offset datetime or an array of offset datetimes, nor (with [~strict:false])
a value that can be converted to an array of offset_datetimes.
*)valfind_offset_datetimes_result:?strict:bool->t->stringlist->(toml_datelist,string)result(** {4 local_datetime value lookup} *)(** Looks up a local_datetime at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not a local datetime
or (when used with [~strict:false], if it cannot be converted to local datetime.
*)valfind_local_datetime:?strict:bool->t->stringlist->toml_date(** Alias for {!find_local_datetime} *)valfind_local_datetime_exn:?strict:bool->t->stringlist->toml_date(** Looks up a local_datetime at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a local datetime
or (when used with [~strict:false], if it cannot be converted to local datetime.
*)valfind_local_datetime_opt:?strict:bool->t->stringlist->toml_dateoption(** Looks up a local_datetime at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a local datetime nor (with [~strict:false])
a value that can be converted to local datetime.
*)valfind_local_datetime_result:?strict:bool->t->stringlist->(toml_date,string)result(** {4 local_datetime array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not a local datetime, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single local_datetime value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of local_datetimes at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of local datetimes
or (when used with [~strict:false], if it cannot be converted to an array of local datetimes.
*)valfind_local_datetimes:?strict:bool->t->stringlist->toml_datelist(** Alias for {!find_local_datetimes} *)valfind_local_datetimes_exn:?strict:bool->t->stringlist->toml_datelist(** Looks up an array of local_datetimes at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a local datetime or an array of local datetimes
or (when used with [~strict:false], if it cannot be converted to an array of local_datetimes.
*)valfind_local_datetimes_opt:?strict:bool->t->stringlist->toml_datelistoption(** Looks up an array of local_datetimes at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a local datetime or an array of local datetimes, nor (with [~strict:false])
a value that can be converted to an array of local_datetimes.
*)valfind_local_datetimes_result:?strict:bool->t->stringlist->(toml_datelist,string)result(** {4 local_date value lookup} *)(** Looks up a local_date at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not a local_date
or (when used with [~strict:false], if it cannot be converted to local_date.
*)valfind_local_date:?strict:bool->t->stringlist->toml_date(** Alias for {!find_local_date} *)valfind_local_date_exn:?strict:bool->t->stringlist->toml_date(** Looks up a local_date at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a local_date
or (when used with [~strict:false], if it cannot be converted to local_date.
*)valfind_local_date_opt:?strict:bool->t->stringlist->toml_dateoption(** Looks up a local_date at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a local_date nor (with [~strict:false])
a value that can be converted to local_date.
*)valfind_local_date_result:?strict:bool->t->stringlist->(toml_date,string)result(** {4 local_date array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not a local date, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single local_date value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of local_dates at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of local dates
or (when used with [~strict:false], if it cannot be converted to an array of local dates.
*)valfind_local_dates:?strict:bool->t->stringlist->toml_datelist(** Alias for {!find_local_dates} *)valfind_local_dates_exn:?strict:bool->t->stringlist->toml_datelist(** Looks up an array of local_dates at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a local date or an array of local dates
or (when used with [~strict:false], if it cannot be converted to an array of local dates.
*)valfind_local_dates_opt:?strict:bool->t->stringlist->toml_datelistoption(** Looks up an array of local_dates at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a local_date or an array of local_dates, nor (with [~strict:false])
a value that can be converted to an array of local_dates.
*)valfind_local_dates_result:?strict:bool->t->stringlist->(toml_datelist,string)result(** {4 local_time value lookup} *)(** Looks up a local_time at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not a local_time
or (when used with [~strict:false], if it cannot be converted to local time.
*)valfind_local_time:?strict:bool->t->stringlist->toml_date(** Alias for {!find_local_time} *)valfind_local_time_exn:?strict:bool->t->stringlist->toml_date(** Looks up a local_time at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a local time
or (when used with [~strict:false], if it cannot be converted to local_time.
*)valfind_local_time_opt:?strict:bool->t->stringlist->toml_dateoption(** Looks up a local_time at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a local time nor (with [~strict:false])
a value that can be converted to local_time.
*)valfind_local_time_result:?strict:bool->t->stringlist->(toml_date,string)result(** {4 local_time array value lookup
Note: for all functions that look up arrays, [~strict:true] applies only to array item conversion.
With [~strict:true] they will fail if an array contains a value that is not a local time, while with [~strict:false]
it will attempt to convert values (i.e. pass [~strict:false] to the accessor function).
If a user supplies a single local time value instead of an array, it will always be converted to a single-item array.
*)(** Looks up an array of local_times at specified path.
@raises {!Key_error} if there's no such key path in the table.
@raises {!Type_error} if the value itself is not a table or the field value is not an array of local times
or (when used with [~strict:false], if it cannot be converted to an array of local times.
*)valfind_local_times:?strict:bool->t->stringlist->toml_datelist(** Alias for {!find_local_times} *)valfind_local_times_exn:?strict:bool->t->stringlist->toml_datelist(** Looks up an array of local_times at specified path, returns [None] if path does not exist.
@raises {!Type_error} if the value itself is not a table or the field value is not a local time or an array of local times
or (when used with [~strict:false], if it cannot be converted to an array of local_times.
*)valfind_local_times_opt:?strict:bool->t->stringlist->toml_datelistoption(** Looks up an array of local_times at specified path, returns an [Error] with a descriptive message
if path does not exist or the value is neither a local time or an array of local_times, nor (with [~strict:false])
a value that can be converted to an array of local times.
*)valfind_local_times_result:?strict:bool->t->stringlist->(toml_datelist,string)resultendend