add CCBV.print

This commit is contained in:
Simon Cruanes 2015-08-11 23:09:08 +02:00
parent ff6157771e
commit 819c1f3249
2 changed files with 11 additions and 0 deletions

View file

@ -300,3 +300,10 @@ let of_seq seq =
|> CCList.of_seq |> List.sort CCOrd.compare = CCList.range 0 10 |> CCList.of_seq |> List.sort CCOrd.compare = CCList.range 0 10
*) *)
let print out bv =
Format.pp_print_string out "bv {";
iter bv
(fun _i b ->
Format.pp_print_char out (if b then '1' else '0')
);
Format.pp_print_string out "}"

View file

@ -113,3 +113,7 @@ type 'a sequence = ('a -> unit) -> unit
val to_seq : t -> int sequence val to_seq : t -> int sequence
val of_seq : int sequence -> t val of_seq : int sequence -> t
val print : Format.formatter -> t -> unit
(** Print the bitvector
@since NEXT_RELEASE *)