package reason

  1. Overview
  2. Docs
Reason: Syntax & Toolchain for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

reason-3.14.0.tbz
sha256=1d09ba24a0594745ab6b38b4d5f81ead8565b73cb69ad46af1c2c26f8d324f00
sha512=542d63c99ab976d011ca39953c022bdd2120177d5905df7ee6ff9623ec4d52c09a323ff7aec95fba5e71611c3850a88172e1c2be94ce68d966b5680ddd436494

doc/reason.cmdliner/Vendored_cmdliner/Cmd/Exit/index.html

Module Cmd.ExitSource

Exit codes and their information.

Exit codes

Sourcetype code = int

The type for exit codes.

Warning. You should avoid status codes strictly greater than 125 as those may be used by some shells.

Sourceval ok : code

ok is 0, the exit status for success.

Sourceval some_error : code

some_error is 123, an exit status for indisciminate errors reported on stderr.

Sourceval cli_error : code

cli_error is 124, an exit status for command line parsing errors.

Sourceval internal_error : code

internal_error is 125, an exit status for unexpected internal errors.

Exit code information

Sourcetype info

The type for exit code information.

Sourceval info : ?docs:string -> ?doc:string -> ?max:code -> code -> info

exit_info ~docs ~doc min ~max describe the range of exit statuses from min to max (defaults to min). doc is the man page information for the statuses, defaults to "undocumented". docs is the title of the man page section in which the statuses will be listed, it defaults to Manpage.s_exit_status.

In doc the documentation markup language can be used with following variables:

  • $(status), the value of min.
  • $(status_max), the value of max.
  • The variables mentioned in the Cmd.info
Sourceval info_code : info -> code

info_code i is the minimal code of i.

Sourceval defaults : info list

defaults are exit code information for ok, some_error cli_error and internal_error.

OCaml

Innovation. Community. Security.