Add a utility function Boolean.iter that iterates a function over a formula.
[tatoo.git] / src / boolean.mli
index 73af3c1..28d6d84 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
-module type ATOM =
-sig
-  include Hcons.S
-  include Common_sig.Printable with type t := t
-end
-
 type ('formula,'atom) expr =
   | False
   | True
@@ -29,7 +23,10 @@ type ('formula,'atom) expr =
 (** View of the internal representation of a formula,
     used for pattern matching *)
 
-module Make(A : ATOM) :
+module Make(A : sig
+  include Hcons.S
+  include Common_sig.Printable with type t := t
+end) :
 sig
   type t
 
@@ -80,4 +77,7 @@ sig
   val fold : (t -> 'a -> 'a) -> t -> 'a -> 'a
   (** [fold f phi acc] folds [f] over the formula structure *)
 
+  val iter : (t -> unit) -> t -> unit
+  (** [iter f phi] iters [f] over the formula structure *)
+
 end