package functoria

  1. Overview
  2. Docs

Configuration builder: stage 1


module P : S


val run : unit -> unit

Run the configuration builder. This should be called exactly once to run the configuration builder: command-line arguments will be parsed, and some code will be generated and compiled.

val run_with_argv : ?help_ppf:Format.formatter -> ?err_ppf:Format.formatter -> string array -> unit

run_with_argv a is the same as run but parses a instead of the process command line arguments. It also allows to set the error and help channels using help_ppf and err_ppf.

Configuration module: stage 2

val register : ?packages:Functoria.package list -> ?keys:Functoria.key list -> ?init:Functoria.job Functoria.impl list -> string -> Functoria.job Functoria.impl list -> unit

register name jobs registers the application named by name which will execute the given jobs. Same optional arguments as Functoria.foreign.

init is the list of job to execute before anything else (such as command-line argument parsing, log reporter setup, etc.). The jobs are always executed in the sequence specified by the caller.