From a2d3b6fe19ca20ad93705947014a8aa342adddb6 Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Wed, 15 Apr 2020 05:21:25 -0700 Subject: [PATCH] [infer] Use pretty printable set/map for Typ.Name Summary: It is better to have pp for debugging. Reviewed By: ezgicicek Differential Revision: D20946408 fbshipit-source-id: ecb4ec456 --- infer/src/IR/Typ.ml | 8 ++++++-- infer/src/IR/Typ.mli | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/infer/src/IR/Typ.ml b/infer/src/IR/Typ.ml index 253d8357e..34b6026de 100644 --- a/infer/src/IR/Typ.ml +++ b/infer/src/IR/Typ.ml @@ -499,16 +499,20 @@ module Name = struct let is_class = function ObjcClass _ -> true | _ -> false end - module Set = Caml.Set.Make (struct + module Set = PrettyPrintable.MakePPSet (struct type nonrec t = t let compare = compare + + let pp = pp end) - module Map = Caml.Map.Make (struct + module Map = PrettyPrintable.MakePPMap (struct type nonrec t = t let compare = compare + + let pp = pp end) end diff --git a/infer/src/IR/Typ.mli b/infer/src/IR/Typ.mli index 90fd3e016..1600afd03 100644 --- a/infer/src/IR/Typ.mli +++ b/infer/src/IR/Typ.mli @@ -261,9 +261,9 @@ module Name : sig val protocol_from_qual_name : QualifiedCppName.t -> t end - module Set : Caml.Set.S with type elt = t + module Set : PrettyPrintable.PPSet with type elt = t - module Map : Caml.Map.S with type key = t + module Map : PrettyPrintable.PPMap with type key = t end val equal : t -> t -> bool