1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
module type S = sig
@BEGIN_FROM_4_12_0@
type spec = Arg.spec =
| Unit of (unit -> unit)
| Bool of (bool -> unit)
| Set of bool ref
| Clear of bool ref
| String of (string -> unit)
| Set_string of string ref
| Int of (int -> unit)
| Set_int of int ref
| Float of (float -> unit)
| Set_float of float ref
| Tuple of spec list
| Symbol of string list * (string -> unit)
| Rest of (string -> unit)
| Rest_all of (string list -> unit)
| Expand of (string -> string array)
@END_FROM_4_12_0@
@BEGIN_BEFORE_4_12_0@
type spec =
| Unit of (unit -> unit)
| Bool of (bool -> unit)
| Set of bool ref
| Clear of bool ref
| String of (string -> unit)
| Set_string of string ref
| Int of (int -> unit)
| Set_int of int ref
| Float of (float -> unit)
| Set_float of float ref
| Tuple of spec list
| Symbol of string list * (string -> unit)
| Rest of (string -> unit)
| Rest_all of (string list -> unit)
| Expand of (string -> string array)
@END_BEFORE_4_12_0@
(** @since 4.12.0:
type spec =
| Unit of (unit -> unit)
| Bool of (bool -> unit)
| Set of bool ref
| Clear of bool ref
| String of (string -> unit)
| Set_string of string ref
| Int of (int -> unit)
| Set_int of int ref
| Float of (float -> unit)
| Set_float of float ref
| Tuple of spec list
| Symbol of string list * (string -> unit)
| Rest of (string -> unit)
| Rest_all of (string list -> unit)
| Expand of (string -> string array)
*)
@BEGIN_FROM_3_08_0@
type key = string
@END_FROM_3_08_0@
@BEGIN_BEFORE_3_08_0@
type key = string
@END_BEFORE_3_08_0@
(** @since 3.08.0: type key = string
*)
@BEGIN_FROM_3_08_0@
type doc = string
@END_FROM_3_08_0@
@BEGIN_BEFORE_3_08_0@
type doc = string
@END_BEFORE_3_08_0@
(** @since 3.08.0: type doc = string
*)
@BEGIN_FROM_3_08_0@
type usage_msg = string
@END_FROM_3_08_0@
@BEGIN_BEFORE_3_08_0@
type usage_msg = string
@END_BEFORE_3_08_0@
(** @since 3.08.0: type usage_msg = string
*)
@BEGIN_FROM_3_08_0@
type anon_fun = string -> unit
@END_FROM_3_08_0@
@BEGIN_BEFORE_3_08_0@
type anon_fun = string -> unit
@END_BEFORE_3_08_0@
(** @since 3.08.0: type anon_fun = string -> unit
*)
exception Help of string
(** Alias for {!Arg.Help} *)
exception Bad of string
(** Alias for {!Arg.Bad} *)
val parse_and_expand_argv_dynamic :
int ref ->
string array ref ->
(key * spec * doc) list ref -> anon_fun -> string -> unit
(** @since 4.05.0:
val parse_and_expand_argv_dynamic :
int ref ->
string array ref ->
(key * spec * doc) list ref -> anon_fun -> string -> unit *)
val parse_expand : (key * spec * doc) list -> anon_fun -> usage_msg -> unit
(** @since 4.05.0:
val parse_expand :
(key * spec * doc) list -> anon_fun -> usage_msg -> unit *)
val read_arg : string -> string array
(** @since 4.05.0: val read_arg : string -> string array *)
val read_arg0 : string -> string array
(** @since 4.05.0: val read_arg0 : string -> string array *)
val write_arg : string -> string array -> unit
(** @since 4.05.0: val write_arg : string -> string array -> unit *)
val write_arg0 : string -> string array -> unit
(** @since 4.05.0: val write_arg0 : string -> string array -> unit *)
val parse_dynamic :
(key * spec * doc) list ref -> anon_fun -> usage_msg -> unit
(** @since 4.02.0:
val parse_dynamic :
(key * spec * doc) list ref -> anon_fun -> usage_msg -> unit *)
val parse_argv_dynamic :
?current:int ref ->
string array -> (key * spec * doc) list ref -> anon_fun -> string -> unit
(** @since 4.02.0:
val parse_argv_dynamic :
?current:int ref ->
string array ->
(key * spec * doc) list ref -> anon_fun -> string -> unit *)
val align : ?limit:int -> (key * spec * doc) list -> (key * spec * doc) list
(** @since 4.02.0:
val align :
?limit:int -> (key * spec * doc) list -> (key * spec * doc) list *)
val usage_string : (key * spec * doc) list -> usage_msg -> string
(** @since 3.12.0:
val usage_string : (key * spec * doc) list -> usage_msg -> string *)
val parse : (key * spec * doc) list -> anon_fun -> usage_msg -> unit
(** Alias for {!Arg.parse} *)
val parse_argv :
?current:int ref ->
string array -> (key * spec * doc) list -> anon_fun -> usage_msg -> unit
(** Alias for {!Arg.parse_argv} *)
val usage : (key * spec * doc) list -> usage_msg -> unit
(** Alias for {!Arg.usage} *)
val current : int ref
(** Alias for {!Arg.current} *)
end
|