]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/http_getter/zack.mli
added zack's helpers
[helm.git] / helm / http_getter / zack.mli
diff --git a/helm/http_getter/zack.mli b/helm/http_getter/zack.mli
new file mode 100644 (file)
index 0000000..581bcfd
--- /dev/null
@@ -0,0 +1,149 @@
+(*
+ * Zack's own OCaml library -- set of "helpers" function for the OCaml language
+ *
+ * Copyright (C) 2003:
+ *    Stefano Zacchiroli <zack@bononia.it>
+ *
+ *  This module is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version 2
+ *  of the License, or (at your option) any later version.
+ *
+ *  This module is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this module; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ *  MA  02111-1307, USA.
+ *)
+
+exception Not_implemented
+
+val fold_in : ('a -> string -> 'a) -> 'a -> in_channel -> 'a
+val iter_in : (string -> unit) -> in_channel -> unit
+val map_in : (string -> 'a) -> in_channel -> 'a list
+val input_lines : in_channel -> string list
+val input_all : in_channel -> string
+val output_lines : string list -> out_channel -> unit
+val read_lines : unit -> string list
+val read_all : unit -> string
+val unsome : 'a option -> 'a
+
+module Array :
+  sig
+    val index : ('a -> bool) -> 'a array -> int
+    val find : ('a -> bool) -> 'a array -> 'a
+
+    val exists : ('a -> bool) -> 'a array -> bool
+    val for_all : ('a -> bool) -> 'a array -> bool
+
+    val filter : ('a -> bool) -> 'a array -> 'a array
+
+(*     val lrotate : ?step:int -> 'a array -> 'a array *)
+(*     val rrotate : ?step:int -> 'a array -> 'a array *)
+  end
+
+module Dbm :
+  sig
+    val fold : ('a -> string -> string -> 'a) -> 'a -> Dbm.t -> 'a
+  end
+
+module Hashtbl :
+  sig
+    val keys : ('a, 'b) Hashtbl.t -> 'a list
+    val values : ('a, 'b) Hashtbl.t -> 'b list
+
+    val remove_all : ('a, 'b) Hashtbl.t -> 'a -> unit
+  end
+
+module List :
+  sig
+    val map' : ('a -> 'b) -> 'a list -> 'b list
+    val map_if : ('a -> 'b) -> ('a -> bool) -> 'a list -> 'b list
+    val map_if' : ('a -> 'b) -> ('a -> bool) -> 'a list -> 'b list
+
+    val assoc_all : 'a -> ('a * 'b) list -> 'b list
+    val assq_all : 'a -> ('a * 'b) list -> 'b list
+
+    val lrotate : 'a list -> 'a list
+    val rrotate : 'a list -> 'a list
+(*     val List.lrotate: ?step:int -> 'a list -> 'a list *)
+(*     val List.rrotate: ?step:int -> 'a list -> 'a list *)
+  end
+
+module Logic :
+  sig
+    val non : ('a -> bool) -> 'a -> bool
+    val conj : ('a -> bool) -> ('a -> bool) -> 'a -> bool
+    val disj : ('a -> bool) -> ('a -> bool) -> 'a -> bool
+    val imply : ('a -> bool) -> ('a -> bool) -> 'a -> bool
+
+    val ( &&& ) : ('a -> bool) -> ('a -> bool) -> 'a -> bool
+    val ( ||| ) : ('a -> bool) -> ('a -> bool) -> 'a -> bool
+    val ( => ) : ('a -> bool) -> ('a -> bool) -> 'a -> bool
+  end
+
+module Random :
+  sig
+    val digit_range : (int * int) list
+    val alpha_upper_range : (int * int) list
+    val alpha_lower_range : (int * int) list
+    val alpha_range : (int * int) list
+    val alphanum_range : (int * int) list
+    val word_range : (int * int) list
+
+    val char : ?ranges:(int * int) list -> unit -> char
+    val string : ?ranges:(int * int) list -> int -> string
+  end
+
+module Stream :
+  sig
+    val map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
+    val fold : ('a -> 'b -> 'a) -> 'a -> 'b Stream.t -> 'a
+
+    val of_inchan : in_channel -> string Stream.t
+  end
+
+module String :
+  sig
+    val explode : string -> char list
+    val implode : char list -> string
+
+    val chomp : string -> string
+
+    val map : (char -> char) -> string -> unit
+    val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a
+(*     val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a *)
+    val iter : (char -> unit) -> string -> unit
+(*     val filter : (char -> bool) -> string -> string *)
+
+    val init : int -> (int -> char) -> string
+  end
+
+(*
+module Sys :
+  sig
+    val copy : src:string -> dst:string -> unit
+  end
+*)
+
+module Unix :
+  sig
+(*     val mkdir : ?parents:bool -> string -> unit *)
+
+    val is_regular : ?follow_symlink:bool -> string -> bool
+    val is_directory : ?follow_symlink:bool -> string -> bool
+    val is_chardev : ?follow_symlink:bool -> string -> bool
+    val is_blockdev : ?follow_symlink:bool -> string -> bool
+    val is_symlink : ?follow_symlink:bool -> string -> bool
+    val is_fifo : ?follow_symlink:bool -> string -> bool
+    val is_socket : ?follow_symlink:bool -> string -> bool
+
+    val size : ?follow_symlink:bool -> string -> int
+
+    val ls : string -> string list
+  end
+