package climate

  1. Overview
  2. Docs

Module Arg_parser.PrivateSource

Low-level functions intended for use within this library only.

Sourceval usage : error:bool -> message:string option -> override_doc:string option -> _ t

A parser that just prints a usage message.

Sourceval to_usage : _ t -> _ t

Replace a parser with a new parser that just prints the usage information about the original parser.

Sourceval spec : _ t -> Climate__.Spec.t
Sourceval finalize : 'a t -> doc:string option -> child_subcommands:Climate__.Subcommand.t list -> prose:Manpage.Prose.t option -> use_error_subcommand:bool -> help_only_doc:string option -> help_only_subcommands:Climate__.Subcommand.t list option -> 'a t
Sourceval named_opt_for_internal : ?doc:string -> ?value_name:string -> ?hidden:bool -> ?completion:'a Completion.t -> Climate__.Name.t Climate__.Climate_stdlib.Nonempty_list.t -> 'a conv -> allow_many:bool -> 'a option t

Like named_opt but takes its arguments as Name.ts rather than as strings is it's intended for use within this library.

Sourceval eval : 'a t -> command_line:Climate__.Command_line.Rich.t -> ignore_errors:bool -> alt_subcommand_for_usage:string list option -> alt_subcommand_for_errors:string list option -> ('a, Climate__.Non_ret.t) result

Evaluate a parser, parsing command-line arguments. The alt_subcommand_ arguments are to support commands like `program help subcommand` where we want usage strings to reference `program subcommand` and error messages to reference `program help`.

Sourceval command_doc_spec : _ t -> Climate__.Command_line.Rich.t -> Climate__.Command_doc_spec.t