package mirage-runtime

  1. Overview
  2. Docs
On This Page
  1. Exit Codes
Legend:
Library
Module
Module type
Parameter
Class
Class type

Functoria runtime.

val register : 'a Cmdliner.Term.t -> unit -> 'a

register t registers the Cmdliner term k as a runtime argument and return a callback f that evaluates to ts' value passed on the command-line.

f will raise Invalid_argument if called before cmdliner's evaluation.

  • deprecated Use register_arg instead.
val register_arg : 'a Cmdliner.Term.t -> unit -> 'a

register_arg t registers the Cmdliner term k as a runtime argument and return a callback f that evaluates to ts' value passed on the command-line.

f will raise Invalid_argument if called before cmdliner's evaluation.

val with_argv : ?sections:string list -> unit Cmdliner.Term.t list -> string -> string array -> unit

with_argv ?sections arguments name argv evaluates the arguments terms on the command-line argv. name is the executable name. sections is a list of sections to include in the man page - useful for enforcing a specific order of sections. On evaluation error the application calls exit(3) with status 64. If `Help or `Version were evaluated, exit(3) is called with status 63.

val runtime_args : unit -> unit Cmdliner.Term.t list

Exit Codes

val argument_error : int

argument_error is the exit code used for argument parsing errors: 64.

val help_version : int

help_version is the exit code used when help/version is used: 63.

OCaml

Innovation. Community. Security.