package cmdlang-stdlib-runner

  1. Overview
  2. Docs

An execution engine for cmdlang based on stdlib.arg.

val run : 'a Cmdlang.Command.t -> 'a
val eval : 'a Cmdlang.Command.t -> argv:string array -> ('a, [ `Help of string | `Bad of string ]) Result.t
val eval_exit_code : unit Cmdlang.Command.t -> argv:string array -> int

Low level implementation

This modules should not be used directly by the users of the runner, but only through the run and eval functions. They are exposed if you want to re-use some existing code to build your own runner.

module Arg_runner : sig ... end

Internal representation used to run a parser.

module Arg_state : sig ... end

Internal representation for cmdlang arg expressions used during parsing.

module Command_selector : sig ... end

Selecting a command within a group hierarchy.

module Param_parser : sig ... end

Parsing parameters according to their specification.

module Parser_state : sig ... end

A mutable state that will collect parsing information.

module Positional_state : sig ... end

A mutable state that will collect parsing information for positional arguments.

OCaml

Innovation. Community. Security.