X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Fextlib%2FhExtlib.mli;h=52b74429cd0e6909539a2c0b8eb2ed26569ca670;hb=41e76668e9389ce17e41747026e533f907a0311c;hp=aed9b240693cdd4a9621984ddec60d1bbc4356b6;hpb=7f2444c2670cadafddd8785b687ef312158376b0;p=helm.git diff --git a/components/extlib/hExtlib.mli b/components/extlib/hExtlib.mli index aed9b2406..52b74429c 100644 --- a/components/extlib/hExtlib.mli +++ b/components/extlib/hExtlib.mli @@ -41,7 +41,8 @@ val is_dir_empty: string -> bool (** checks if the dir is empty *) val rmdir_descend: string -> unit (** rmdir -p *) - (** find all _files_ matching test under a filesystem root *) + (** find all _files_ whose name matches test under a filesystem root. + * Test is passed the filename path relative to the given filesystem root *) val find: ?test:(string -> bool) -> string -> string list (** {2 File I/O} *) @@ -52,6 +53,10 @@ val output_file: filename:string -> text:string -> unit (** other way round *) (** {2 Exception handling} *) + (** @param finalizer finalization function (execution both in case of success + * and in case of raised exception + * @param f function to be invoked + * @param arg argument to be passed to function *) val finally: (unit -> unit) -> ('a -> 'b) -> 'a -> 'b (** {2 Char processing} *) @@ -81,7 +86,7 @@ type profiler = { profile : 'a 'b. ('a -> 'b) -> 'a -> 'b } (** @return a profiling function; [s] is used for labelling the total time at * the end of the execution *) val profile : ?enable:bool -> string -> profiler -val set_profiling_printings : (unit -> bool) -> unit +val set_profiling_printings : (string -> bool) -> unit (** {2 Localized exceptions } *) @@ -93,3 +98,7 @@ val floc_of_loc: int * int -> Token.flocation val dummy_floc: Lexing.position * Lexing.position val raise_localized_exception: offset:int -> Token.flocation -> exn -> 'a + +(* size in KB (SLOW) *) +val estimate_size: 'a -> int +