package dtools
Install
Dune Dependency
Authors
Maintainers
Sources
md5=278d5baa2d2464e91dea6b8a7cfae6f0
sha512=abd158530fc136598e6fdba6c70cc433984ef5d5e9abda80e1f5ac1b6975869b99cdff62dba96510f1bd64b4035ac7c8462a7e0a801a55158bf3204fb2771869
doc/dtools/Dtools/Conf/index.html
Module Dtools.Conf
Source
Configuration management module.
Type for links between keys
Type for untyped keys (or keys with unknown type)
kind
: a string describing the type of this keydescr
: a key description/titlecomments
: some comments on the key purposesplug
: a way to plug subkeyssubs
: the list of link names to subkeyspath
: a way to access subkeysroutes
: a way to find paths to an other key
type 'a t =
< kind : string option
; alias : ?comments:string list -> ?descr:string -> (ut -> unit) -> 'a t
; descr : string
; comments : string list
; plug : link -> ut -> unit
; subs : link list
; path : path -> ut
; routes : ut -> path list
; ut : ut
; set_d : 'a option -> unit
; get_d : 'a option
; set : 'a -> unit
; get : 'a
; validate : ('a -> bool) -> unit
; on_change : ('a -> unit) -> unit >
Type for 'a keys
ut
: cast to un untyped keyset_d
: set the default value associated to the keyget_d
: get the default value associated to the keyset
: set the key value according to a user demmandget
: retrieve the resulting key value
Raised when an invalid link has been specified
Raised when bad configuration assignations are encountered
Raised when bad configuration assignations are encountered inside configuration files
type 'a builder =
?d:'a ->
?p:(ut -> unit) ->
?l:links ->
?comments:string list ->
string ->
'a t
Receipt to build a 'a key
A structural key builder
Casts to specificaly typed keys. Raises Mismatch
on mismatching cast.
Add a value to the configuration keys, according to the given correctly formated string: "type key :value" Raises Wrong_Conf
in badly formated cases.
Read configuration values from the file associated with the given filename. Raises File_Wrong_Conf
with filename line and and error message in case of a bad configuration file.