package cmdlang

  1. Overview
  2. Docs
type 'a t

Applicative operations

val return : 'a -> 'a t
val apply : ('a -> 'b) t -> 'a t -> 'b t
val map : 'a t -> f:('a -> 'b) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t

Named arguments

val flag : string Nonempty_list.t -> doc:string -> bool t
val flag_count : string Nonempty_list.t -> doc:string -> int t
val named : ?docv:string -> string Nonempty_list.t -> 'a Param.t -> doc:string -> 'a t
val named_multi : ?docv:string -> string Nonempty_list.t -> 'a Param.t -> doc:string -> 'a list t
val named_opt : ?docv:string -> string Nonempty_list.t -> 'a Param.t -> doc:string -> 'a option t
val named_with_default : ?docv:string -> string Nonempty_list.t -> 'a Param.t -> default:'a -> doc:string -> 'a t

Positional arguments

Positional argument start at index 0.

val pos : ?docv:string -> pos:int -> 'a Param.t -> doc:string -> 'a t
val pos_opt : ?docv:string -> pos:int -> 'a Param.t -> doc:string -> 'a option t
val pos_with_default : ?docv:string -> pos:int -> 'a Param.t -> default:'a -> doc:string -> 'a t
val pos_all : ?docv:string -> 'a Param.t -> doc:string -> 'a list t
OCaml

Innovation. Community. Security.