File: arg.mli

package info (click to toggle)
ocaml-stdcompat 20~git20240529-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,540 kB
  • sloc: ml: 34,099; sh: 861; makefile: 249
file content (44 lines) | stat: -rw-r--r-- 1,603 bytes parent folder | download | duplicates (9)
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
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) 
type key = string
type doc = string
type usage_msg = string
type anon_fun = string -> unit
val parse : (key * spec * doc) list -> anon_fun -> usage_msg -> unit
val parse_dynamic :
  (key * spec * doc) list ref -> anon_fun -> usage_msg -> unit
val parse_argv :
  ?current:int ref ->
    string array -> (key * spec * doc) list -> anon_fun -> usage_msg -> unit
val parse_argv_dynamic :
  ?current:int ref ->
    string array -> (key * spec * doc) list ref -> anon_fun -> string -> unit
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
exception Help of string 
exception Bad of string 
val usage : (key * spec * doc) list -> usage_msg -> unit
val usage_string : (key * spec * doc) list -> usage_msg -> string
val align : ?limit:int -> (key * spec * doc) list -> (key * spec * doc) list
val current : int ref
val read_arg : string -> string array
val read_arg0 : string -> string array
val write_arg : string -> string array -> unit
val write_arg0 : string -> string array -> unit