Displaying 2 results from an estimated 2 matches for "4959de6".
Did you mean:
4359ee6
2016 Aug 25
1
[PATCH] mllib: Add String.map function for OCaml < 4.00.0.
...for i = 0 to len-1 do
+ Bytes.unsafe_set b i (f (unsafe_get s i))
+ done;
+ Bytes.to_string b
+
let lowercase_ascii s = map Char.lowercase_ascii s
let uppercase_ascii s = map Char.uppercase_ascii s
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index 4959de6..de95f9d 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -49,6 +49,8 @@ module String : sig
val sub : string -> int -> int -> string
val unsafe_get : string -> int -> char
+ val map : (char -> char) -> string -> string
+
val lowercase_...
2016 Aug 02
2
[PATCH] mllib: move which and its exception from dib
...+ with Unix.Unix_error _ -> None
+ ) paths in
+ match paths with
+ | [] -> raise (Executable_not_found executable)
+ | x :: _ -> x
+
(* Program name. *)
let prog = Filename.basename Sys.executable_name
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index de97815..4959de6 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -78,6 +78,10 @@ module String : sig
end
(** Override the String module from stdlib. *)
+(** Exception thrown by [which] when the specified executable is not found
+ in [$PATH]. *)
+exception Executable_not_found of string (*...