package ocp-build

  1. Overview
  2. Docs
type info
type env
type spec =
  1. | Unit of unit -> unit
  2. | Bool of bool -> unit
  3. | Set of bool ref
  4. | Clear of bool ref
  5. | String of string -> unit
  6. | Set_string of string ref
  7. | Int of int -> unit
  8. | Set_int of int ref
  9. | Float of float -> unit
  10. | Set_float of float ref
  11. | Symbol of string list * string -> unit
  12. | File of string -> unit
  13. | Anon of int * string -> unit
  14. | Anons of string list -> unit
type arg_list = (string list * spec * info) list
type command = {
  1. cmd_name : string;
  2. cmd_action : unit -> unit;
  3. cmd_args : arg_list;
  4. cmd_man : block list;
  5. cmd_doc : string;
}
val parse : ?name:string -> ?version:string -> ?man:block list -> ?argv:string array -> (string * spec * string) list -> (string -> unit) -> string -> unit
val translate : ?docs:string -> (string * spec * string) list -> (string list * spec * info) list
val translate_anon : (string -> unit) -> (string list * spec * info) list