From 9d26f15d42c4cfb8707c9f73ce35144ac9332a7a Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 20 Aug 2024 15:24:40 -0400 Subject: [PATCH] add `Basic_bv.pp` --- src/core/basic_bv.ml | 3 +++ src/core/basic_bv.mli | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/basic_bv.ml b/src/core/basic_bv.ml index 8925993f..1ff30e9c 100644 --- a/src/core/basic_bv.ml +++ b/src/core/basic_bv.ml @@ -54,3 +54,6 @@ let to_list self : _ list = let l = ref [] in iter self (fun x -> l := x :: !l); !l + +let show self = spf "" (length self) +let pp out (self : t) = Fmt.string out (show self) diff --git a/src/core/basic_bv.mli b/src/core/basic_bv.mli index ad403bef..c072a147 100644 --- a/src/core/basic_bv.mli +++ b/src/core/basic_bv.mli @@ -1,6 +1,6 @@ (** A really basic bitvector *) -type t [@@deriving twine] +type t [@@deriving twine, show] val create : int -> t val get : t -> int -> bool