package cmdliner-stdlib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=19b5b963c21b6fe98d2f62e404e53611c3bcc7baf538efd01f598ef928257aae
sha512=bfb47467967e662e22163de0714642eb3a4cec05c85e0d76b0a5eebe75e2d3b1a3273432b58e1e4ab078026597182dd9d517832405bf00ef02d7751d0b3c9ece
doc/cmdliner-stdlib/Cmdliner_stdlib/index.html
Module Cmdliner_stdlib
Source
OCaml runtime keys
The OCaml runtime is usually configurable via the OCAMLRUNPARAM
environment variable. We provide boot parameters covering these options.
--backtrace
: Output a backtrace if an uncaught exception terminated the application. default
is the default value if the parameter is not provided on the command-line.
--randomize-hashtables
: Randomize all hash tables. default
is the default value if the parameter is not provided on the command-line.
gc_control
is a term that evaluates to a value of type Gc.control
. default
is the default value if the parameter is not provided on the command-line..
The OCaml garbage collector can be configured, as described in detail in GC control.
val setup :
?backtrace:bool option ->
?randomize_hashtables:bool option ->
?gc_control:Gc.control option ->
unit ->
unit Cmdliner.Term.t
setup ?backtrace ?randomize_hashtables ?gc_control ()
is the term that set the corresponding OCaml runtime parameters:
- if
backtrace
is set toSome d
, adding--backtrace
on the command-line will callPrintexc.record_backtrace
.d
is the default if case no parameters are provided. If not set,backtrace
isSome false
to match the default OCaml runtime behavior. - if
randomize_hashtables
is set toSome d
, adding--randomize-hashtables
to the command-line will callHashtable.randomize ()
.d
is the default if no paramaters are provided. If not set,randomize_hashtables
is set toSome false
to match the default OCaml runtime behavior. - if
gc_control
is set toSome d
, various control parameters are added to the command-line options that will causeGc.set
with the right parameters.d
is the default if no parameters are provided. If not set,gc_control
isSome (Gc.get ())
.