package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include sig ... end
module type S = sig ... end
type 'a t = 'a Command.Param.t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (<*) : 'a t -> unit t -> 'a t
val (*>) : unit t -> 'a t -> 'a t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
val apply : ('a -> 'b) t -> 'a t -> 'b t
val map2 : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val map3 : 'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t
val all : 'a t list -> 'a list t
val all_unit : unit t list -> unit t
module Applicative_infix : sig ... end
val flag : ?aliases:Base.string Base.list -> ?full_flag_required:Base.unit -> Base.string -> 'a Command.Flag.t -> doc:Base.string -> 'a t
val flag_optional_with_default_doc : ?aliases:Base.string Base.list -> ?full_flag_required:Base.unit -> Base.string -> 'a Command.Arg_type.t -> ('a -> Base.Sexp.t) -> default:'a -> doc:Base.string -> 'a t
val anon : 'a Command.Anons.t -> 'a t
val escape_anon : final_anon:'a Command.Anons.t -> ('a * Base.string Base.list) t
module If_nothing_chosen : sig ... end
val choose_one : 'a Base.option t Base.list -> if_nothing_chosen:('a, 'b) If_nothing_chosen.t -> 'b t
val choose_one_non_optional : 'a t Base.list -> if_nothing_chosen:('a, 'b) If_nothing_chosen.t -> 'b t
val and_arg_names : 'a t -> ('a * Base.string Base.list) t
val and_arg_name : 'a t -> ('a * Base.string) t
val arg_names : 'a t -> Base.string Base.list
val optional_to_required : 'a Base.option t -> 'a t
val required : 'a Command.Arg_type.t -> 'a Command.Flag.t
val optional_with_default : 'a -> 'a Command.Arg_type.t -> 'a Command.Flag.t
val one_or_more_as_pair : 'a Command.Arg_type.t -> ('a * 'a Base.list) Command.Flag.t
val one_or_more_as_list : 'a Command.Arg_type.t -> 'a Base.list Command.Flag.t
val no_arg_register : key:'a Univ_map.With_default.Key.t -> value:'a -> Base.bool Command.Flag.t
val no_arg_some : 'a -> 'a Base.option Command.Flag.t
val no_arg_required : 'a -> 'a Command.Flag.t
val no_arg_abort : exit:(Base.unit -> Base.Nothing.t) -> Base.unit Command.Flag.t
val map_flag : 'a Command.Flag.t -> f:('a -> 'b) -> 'b Command.Flag.t
val sequence : 'a Command.Anons.t -> 'a Base.list Command.Anons.t
val non_empty_sequence_as_pair : 'a Command.Anons.t -> ('a * 'a Base.list) Command.Anons.t
val non_empty_sequence_as_list : 'a Command.Anons.t -> 'a Base.list Command.Anons.t
val maybe_with_default : 'a -> 'a Command.Anons.t -> 'a Command.Anons.t
val t2 : 'a Command.Anons.t -> 'b Command.Anons.t -> ('a * 'b) Command.Anons.t
val t3 : 'a Command.Anons.t -> 'b Command.Anons.t -> 'c Command.Anons.t -> ('a * 'b * 'c) Command.Anons.t
val t4 : 'a Command.Anons.t -> 'b Command.Anons.t -> 'c Command.Anons.t -> 'd Command.Anons.t -> ('a * 'b * 'c * 'd) Command.Anons.t
val map_anons : 'a Command.Anons.t -> f:('a -> 'b) -> 'b Command.Anons.t
val parse : 'a t -> Base.string Base.list -> 'a Base.Or_error.t
module Arg_type = Arg_type
include module type of struct include Arg_type.Export end

Values to include in other namespaces.

Values to include in other namespaces.

Beware that an anonymous argument of type int cannot be specified as negative, as it is ambiguous whether -1 is a negative number or a flag. (The same applies to float, time_span, etc.) You can use the special built-in "-anon" flag to force a string starting with a hyphen to be interpreted as an anonymous argument rather than as a flag, or you can just make it a parameter to a flag to avoid the issue.

val sexp_conv : ?complete:Command.Auto_complete.t -> (Base.Sexp.t -> 'a) -> 'a Command.Param.Arg_type.t
OCaml

Innovation. Community. Security.