diff --git a/src/API.mli b/src/API.mli index 835b453ef..3b5c58d3f 100644 --- a/src/API.mli +++ b/src/API.mli @@ -1271,6 +1271,8 @@ module Utils : sig module type S = sig include Map.S include Show1 with type 'a t := 'a t + val pp_key : Format.formatter -> key -> unit + val show_key : key -> string end module type OrderedType = sig diff --git a/src/utils/util.ml b/src/utils/util.ml index 62e184b02..7eb6223a1 100644 --- a/src/utils/util.ml +++ b/src/utils/util.ml @@ -25,6 +25,8 @@ module Map = struct module type S = sig include Map.S include Show1 with type 'a t := 'a t + val pp_key : Format.formatter -> key -> unit + val show_key : key -> string end module type OrderedType = sig @@ -44,6 +46,9 @@ module Map = struct pp f fmt m; Format.fprintf fmt "@?"; Buffer.contents b + + let pp_key = Ord.pp + let show_key = Ord.show end end diff --git a/src/utils/util.mli b/src/utils/util.mli index 20245d687..cc18f0837 100644 --- a/src/utils/util.mli +++ b/src/utils/util.mli @@ -27,6 +27,8 @@ module Map : sig module type S = sig include Map.S include Show1 with type 'a t := 'a t + val pp_key : Format.formatter -> key -> unit + val show_key : key -> string end module type OrderedType = sig