Skip to content
Permalink
Browse files
use sets module to identify sets
  • Loading branch information
bartekgorny committed Apr 16, 2019
1 parent 32d2e3a commit 8d5fa6dbc9cb680f1eac1d753820dfe64f0300d4
Showing 2 changed files with 6 additions and 3 deletions.
@@ -100,8 +100,6 @@ limit(Name, Arity, Limit) when is_atom(Name), is_integer(Arity) ->

%% @private if a tuple is a known record, formats is as "#recname{field=value}", otherwise returns
%% just a printout of a tuple.
format_tuple(Tuple) when element(1, Tuple) == set ->
["set:", recon_trace:format_trace_output(true, sets:to_list(Tuple))];
format_tuple(Tuple) ->
ensure_table_exists(),
First = element(1, Tuple),
@@ -620,7 +620,12 @@ format_trace_output(Recs, Args) ->
format_trace_output(Recs, recon_map:is_active(), Args).

format_trace_output(true, _, Args) when is_tuple(Args) ->
recon_rec:format_tuple(Args);
case sets:is_set(Args) of
true ->
["set:", format_trace_output(true, sets:to_list(Args))];
false ->
recon_rec:format_tuple(Args)
end;
format_trace_output(true, Maps, Args) when is_list(Args) ->
case io_lib:printable_list(Args) of
true ->

0 comments on commit 8d5fa6d

Please sign in to comment.