module Smisc: sig .. end
Misc functions.
val fatal_error : string -> unit
fatal_error s prints the given string on stderr and
exit with code 1.
Author(s): Maxence Guesdon
Version: 1.0

Misc.fatal_error
val safe_main : (unit -> unit) -> unit
safe_main f calls
f () but handles
Sys_error and
Failure
exceptions by exiting with error code 1.
Author(s): Maxence Guesdon
Version: 1.0

Misc.safe_main
val try_finalize : ('a -> 'b) -> 'a -> ('c -> unit) -> 'c -> 'b
try_finalize f x g y applies
f to
x and return
the result or raises an exception, but in all cases
g is applied to
y before returning or raising the exception.
Author(s): Didier Rémy
Version: 1.0

Misc.try_finalize
val unopt : ?default:'a -> 'a option -> 'a
unopt v returns
v' if
v = Some v' and raises
Invalid_argument "unopt None" otherwize.
Author(s): Pierre-Yves Strub
Version: 1.0

Misc.unopt
default : can be used to give a default value which is returned
when v = None
val md5sum_of_file : string -> string
md5sum_of_file file returns the md5sum from the content of the given file,
using the
md5sum tool.
Author(s): Maxence Guesdon
Version: 1.0
Raises Unix_error if an error occurs.

Misc.md5sum_of_file
val md5sum_of_string : string -> string
md5sum_of_file file returns the md5sum from the content of the given file,
using the
md5sum tool.
Author(s): Maxence Guesdon
Version: 1.0
Raises Unix_error if an error occurs.

Misc.md5sum_of_string
val my_int_of_string : string -> int
my_int_of_string acts like
Pervasives.int_of_string except that
it does not fail when the string begins with one or more '+' sign(s).
Author(s): Maxence Guesdon
Version: 1.0
Raises Invalid_argument if the string is not an integer.

Misc.my_int_of_string