Module Assemblage_driver.Driver

module Driver: sig .. end
Initializing drivers.

Driver uses the Assemblage_driver.Lib_prefs and Assemblage_driver.Loader modules transparently to initialize a driver. See an example.



Initialization


type init = (Assemblage_driver.Lib_prefs.t * Assemblage_driver.Loader.t) option 
The type for initialisation results.
val init : ?version_opt:bool ->
?kinds:Assemblage_driver.Loader.kind list ->
docs:string -> unit -> init * unit Cmdliner.Term.t
init ?version_opt ?kinds ~docs an initialization value (init,t). docs is the manual section in which the command line options for initialization are documented. kinds is the kinds of loader that should be supported (defaults to all). version_opt should be true if the driver supports a --version option through Cmdliner (defaults to false).

The returned term t should always be used in all the Cmdliner terms that your program may evaluate. It contains the command line specification for initialization and may evaluate to an error that happened during initalization that will be reported by Cmdliner's error mechanism.

There are two cases to consider:


val man_vars : ?kinds:Assemblage_driver.Loader.kind list ->
unit -> Cmdliner.Manpage.block list
man_vars kinds is a man page fragment for the environment variables used by Assemblage_driver.Driver.init.

Example

This simple example shows how to output the version of a project as it could be configured on the command line.

FIXME.

  let main () = ()