X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Fextlib%2FhExtlib.mli;h=a38b09334c7d2cb677c4e673d911f73441015443;hb=b1c222ae8d9bee83d6c5723533a1395d7353893a;hp=c41b2f94c60f5d59bb8d39d525d1db2c78893c01;hpb=e0823263070af6e0b6f939a2c3206a7c224bcb98;p=helm.git diff --git a/components/extlib/hExtlib.mli b/components/extlib/hExtlib.mli index c41b2f94c..a38b09334 100644 --- a/components/extlib/hExtlib.mli +++ b/components/extlib/hExtlib.mli @@ -53,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} *) @@ -74,6 +78,7 @@ val list_uniq: val filter_map: ('a -> 'b option) -> 'a list -> 'b list (** filter + map *) val list_concat: ?sep:'a list -> 'a list list -> 'a list (**String.concat-like*) val list_findopt: ('a -> 'b option) -> 'a list -> 'b option +val flatten_map: ('a -> 'b list) -> 'a list -> 'b list (** {2 Debugging & Profiling} *) @@ -94,3 +99,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 +