]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/extlib/hExtlib.mli
added level2 <-> level3 transformations
[helm.git] / helm / ocaml / extlib / hExtlib.mli
index ad055315e077faf337f0d937fb2b516eada03eab..46ea0b9cebfb3f7ddbe3533935adf2b58911ddb0 100644 (file)
@@ -34,6 +34,9 @@ val is_dir: string -> bool  (** @return true if file is a directory *)
 val is_regular: string -> bool  (** @return true if file is a regular file *)
 val mkdir: string -> unit (** create dir and parents. @raise Failure *)
 
+  (** find all _files_ matching test under a filesystem root *)
+val find: ?test:(string -> bool) -> string -> string list 
+
 (** {2 File I/O} *)
 
 val input_file: string -> string  (** read all the contents of file to string *)
@@ -49,6 +52,11 @@ val finally: (unit -> unit) -> ('a -> 'b) -> 'a -> 'b
 val split: ?sep:char -> string -> string list (** @param sep defaults to ' ' *)
 val trim_blanks: string -> string (** strip heading and trailing blanks *)
 
+(** {2 List processing} *)
+
+val list_uniq: 'a list -> 'a list (* uniq unix filter on lists *)
+val filter_map: ('a -> 'b option) -> 'a list -> 'b list (* filter + map *)
+
 (** {2 Debugging & Profiling} *)
 
 type profiler = { profile : 'a 'b. ('a -> 'b) -> 'a -> 'b }