Skip to content

Commit 3002284

Browse files
committed
Simplify history thread ID printing (issue #552)
1 parent 5371706 commit 3002284

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cdomains/threadIdDomain.ml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ struct
9898
end
9999
include Printable.Prod (P) (S)
100100

101+
let pretty () (p, s) =
102+
let p = List.rev p in (* show in "unreversed" order *)
103+
if S.is_empty s then
104+
P.pretty () p (* hide empty set *)
105+
else
106+
Pretty.dprintf "%a, %a" P.pretty p S.pretty s
107+
108+
let show x = Pretty.sprint ~width:max_int (pretty () x)
109+
101110
module D =
102111
struct
103112
include S

0 commit comments

Comments
 (0)