aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Commandline.mli
diff options
context:
space:
mode:
Diffstat (limited to 'driver/Commandline.mli')
-rw-r--r--driver/Commandline.mli11
1 files changed, 8 insertions, 3 deletions
diff --git a/driver/Commandline.mli b/driver/Commandline.mli
index 32f5daf3..e1b917f2 100644
--- a/driver/Commandline.mli
+++ b/driver/Commandline.mli
@@ -35,12 +35,17 @@ type action =
| Integer of (int -> unit) (** read next arg as an int, call function *)
| Ignore (** ignore the next arg *)
| Unit of (unit -> unit) (** call the function with unit as argument *)
-
-val parse_cmdline: (pattern * action) list -> unit
-
(* Note on precedence: [Exact] patterns are tried first, then the other
patterns are tried in the order in which they appear in the list. *)
+exception CmdError of string
+(** Raise by [parse_cmdline] when an error occured *)
+
+val parse_cmdline: (pattern * action) list -> unit
+(** [parse_cmdline actions] parses the commandline and performs all [actions].
+ Raises [CmdError] if an error occurred.
+*)
+
val longopt_int: string -> (int -> unit) -> pattern * action
(** [longopt_int key fn] generates a pattern and an action for
options of the form [key=<n>] and calls [fn] with the integer argument