-
-(* numeric operations ******************************************************)
-
-let int_of_list = function
- | [s] -> int_of_string s
- | _ -> raise (Failure "int_of_list")
-
-let le v1 v2 =
- try if int_of_list v1 <= int_of_list v2 then mql_true else mql_false
- with _ -> mql_false
-
-let lt v1 v2 =
- try if int_of_list v1 < int_of_list v2 then mql_true else mql_false
- with _ -> mql_false
-
-let align n v =
- let c = String.length v in
- try
- let l = int_of_list [n] in
- if c < l then [(String.make (l - c) ' ') ^ v] else [v]
- with _ -> [v]
-
-(* context handling ********************************************************)
-
-let rec set ap = function
- | [] -> [ap]
- | head :: tail when fst head = fst ap -> ap :: tail
- | head :: tail -> head :: set ap tail
-
-(* time handling ***********************************************************)
-
-type time = float * float
-
-let start_time () =
- (Sys.time (), Unix.time ())
-
-let stop_time (s0, u0) =
- let s1 = Sys.time () in
- let u1 = Unix.time () in
- Printf.sprintf "%.2fs,%.2fs" (s1 -. s0) (u1 -. u0)