From 4b359a40f2ad72094a0f5d20b83358afbcb2db7f Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 12 Oct 2022 12:20:20 -0400 Subject: [PATCH] improve Int_id for tracing --- src/trace/sidekick_trace.ml | 2 -- src/util/Int_id.ml | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/trace/sidekick_trace.ml b/src/trace/sidekick_trace.ml index 759b9659..70c81053 100644 --- a/src/trace/sidekick_trace.ml +++ b/src/trace/sidekick_trace.ml @@ -18,10 +18,8 @@ (** {2 Exports} *) -module Entry_view = Entry_view module Sink = Sink module Source = Source module Entry_id = Entry_id type entry_id = Entry_id.t -type entry_view = Entry_view.t = .. diff --git a/src/util/Int_id.ml b/src/util/Int_id.ml index bf69dd40..0423b55b 100644 --- a/src/util/Int_id.ml +++ b/src/util/Int_id.ml @@ -3,9 +3,8 @@ module type S = sig type t = private int - val equal : t -> t -> bool - val compare : t -> t -> int - val hash : t -> int + include Sidekick_sigs.EQ_ORD_HASH_PRINT with type t := t + val to_int : t -> int val of_int_unsafe : int -> t end @@ -17,6 +16,7 @@ module Make () = struct let equal : t -> t -> bool = ( = ) let compare : t -> t -> int = compare let hash = CCHash.int + let pp = CCFormat.int let[@inline] to_int i = i external of_int_unsafe : int -> t = "%identity"