Up

Module Flags_ext

Signature

type 'a setter =
| No_arg of 'a
| Arg of string -> 'a
type ('a, 'flag) t
val flag : (_, 'flag) t -> 'flag
val get : ('a, _) t -> 'a
val is_set : (_, _) t -> bool
val create_optional : name:string -> doc:string -> 'a setter -> ('a option, unit Flag.t) t
val create : ?default:'a * ('a -> string) -> name:string -> doc:string -> 'a setter -> ('a, unit Flag.t) t
val create_many : ?at_least_one:bool -> name:string -> doc:string -> 'a setter -> ('a list, unit Flag.t) t
val create_choice : ?default:'a * ('a -> string) -> (string * string * 'a setter) list -> ('a, unit Flag.t list) t
val create_choice_optional : (string * string * 'a setter) list -> ('a option, unit Flag.t list) t
val create_set : name:string -> doc:string -> (bool, unit Flag.t) t
val create_rest : ?name:string -> doc:string -> unit -> (string list option, unit Flag.t) t