package ocamlformat

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Extension of Cmdliner supporting lighter-weight option definition

include module type of struct include Cmdliner end
module Manpage = Cmdliner.Manpage
module Term = Cmdliner.Term
module Cmd = Cmdliner.Cmd
module Arg = Cmdliner.Arg
val mk : default:'a -> 'a Term.t -> 'a Stdlib.ref

mk ~default term is a ref which, after parse is called, contains the value of the command line option specified by term.

val parse : Cmd.info -> (unit -> 'a Term.ret) -> ('a Cmd.eval_ok, Cmd.eval_error) Stdlib.result

parse info validate parses the command line according to the options declared by calls to mk, using manual and version info, and calling validate to check usage constraints not expressible in the Term language.

OCaml

Innovation. Community. Security.