Fix error message; arguments were swapped around.
[whenjobs.git] / lib / whenutils.mli
index 5f62f5c..73d5084 100644 (file)
@@ -117,6 +117,10 @@ end
 val (//) : string -> string -> string
 (** [dir // file] concatenates directory and file. *)
 
+val isalpha : char -> bool
+val isalnum : char -> bool
+(** Character tests. *)
+
 val filter_map : ('a -> 'b option) -> 'a list -> 'b list
 (** Filter + map. *)
 
@@ -128,9 +132,21 @@ type whenexpr =
   | Expr_var of string                  (** A variable name. *)
   | Expr_and of whenexpr * whenexpr     (** && *)
   | Expr_or of whenexpr * whenexpr      (** || *)
+  | Expr_lt of whenexpr * whenexpr      (** < *)
+  | Expr_le of whenexpr * whenexpr      (** <= *)
   | Expr_eq of whenexpr * whenexpr      (** == *)
-  | Expr_not of whenexpr                (** ! *)
+  | Expr_ge of whenexpr * whenexpr      (** >= *)
+  | Expr_gt of whenexpr * whenexpr      (** > *)
+  | Expr_not of whenexpr                (** boolean not *)
+  | Expr_add of whenexpr * whenexpr     (** arithmetic addition or string cat *)
+  | Expr_sub of whenexpr * whenexpr     (** arithmetic subtraction *)
+  | Expr_mul of whenexpr * whenexpr     (** arithmetic multiplication *)
+  | Expr_div of whenexpr * whenexpr     (** arithmetic division *)
+  | Expr_mod of whenexpr * whenexpr     (** arithmetic modulo *)
   | Expr_changes of string              (** changes var *)
+  | Expr_increases of string            (** increases var *)
+  | Expr_decreases of string            (** decreases var *)
+  | Expr_prev of string                 (** prev var *)
 (** Internal type used to represent 'when' expressions. *)
 
 type periodexpr =
@@ -153,6 +169,8 @@ type variable =
   | T_float of float
 (** Typed variable (see also [whenproto.x]) *)
 
+val string_of_variable : variable -> string
+
 val variable_of_rpc : Whenproto_aux.variable -> variable
 val rpc_of_variable : variable -> Whenproto_aux.variable