module Misc:sig..end
val fatal_error : string -> 'aexception Fatal_error
val try_finally : (unit -> 'a) -> (unit -> unit) -> 'aval map_end : ('a -> 'b) -> 'a list -> 'b list -> 'b listmap_end f l t is map f l @ t, Just more efficient.val map_left_right : ('a -> 'b) -> 'a list -> 'b listList.map, with guaranteed left-to-right evaluation orderval for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> boolList.for_all but for a binary predicate.
In addition, this for_all2 never fails: given two lists
with different lengths, it returns false.val replicate_list : 'a -> int -> 'a listreplicate_list elem n is the list with n elements
all identical to elem.val list_remove : 'a -> 'a list -> 'a listlist_remove x l returns a copy of l with the first
element equal to x removed.val split_last : 'a list -> 'a list * 'aval samelist : ('a -> 'a -> bool) -> 'a list -> 'a list -> boolList.for_all2 but returns false if the two
lists have different length.val may : ('a -> unit) -> 'a option -> unitval may_map : ('a -> 'b) -> 'a option -> 'b optionval find_in_path : string list -> string -> stringval find_in_path_uncap : string list -> string -> stringval remove_file : string -> unitval expand_directory : string -> string -> stringexpand_directory alt file eventually expands a + at the
beginning of file into alt (an alternate root directory)val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Hashtbl.tval copy_file : Pervasives.in_channel -> Pervasives.out_channel -> unitcopy_file ic oc reads the contents of file ic and copies
them to oc. It stops when encountering EOF on ic.val copy_file_chunk : Pervasives.in_channel -> Pervasives.out_channel -> int -> unitcopy_file_chunk ic oc n reads n bytes from ic and copies
them to oc. It raises End_of_file when encountering
EOF on ic.val log2 : int -> intlog2 n returns s such that n = 1 lsl s
if n is a power of 2val align : int -> int -> intalign n a rounds n upwards to a multiple of a
(a power of 2).val no_overflow_add : int -> int -> boolno_overflow_add n1 n2 returns true if the computation of
n1 + n2 does not overflow.val no_overflow_sub : int -> int -> boolno_overflow_add n1 n2 returns true if the computation of
n1 - n2 does not overflow.val no_overflow_lsl : int -> boolno_overflow_add n returns true if the computation of
n lsl 1 does not overflow.val chop_extension_if_any : string -> stringval chop_extensions : string -> string.xyz.uvw for instance.
Return the given name if it does not contain an extension.
val search_substring : string -> string -> int -> intsearch_substring pat str start returns the position of the first
occurrence of string pat in string str. Search starts
at offset start in str. Raise Not_found if pat
does not occur.val rev_split_words : string -> string listrev_split_words s splits s in blank-separated words, and return
the list of words in reverse order.