module Rep_misc: sig
.. end
Misc functions.
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
val value_of_file : string -> 'a
value_of_file filename
reads a value from filename
using
input_value
.
Author(s): Fabrice Lefessant
Version: 1.0
Raises Sys_error
if the file could not be opened.
val file_of_value : string -> 'a -> unit
file_of_value filename v
writes a value v
to filename
using
output_value
.
Author(s): Fabrice Lefessant
Version: 1.0
Raises Sys_error
if the file could not be opened.
val chop_n_char : int -> string -> string
chop_n_char n s
returns the given string where characters after position n
are replaced by "..."
.
Version: 1.0