Skip to content

Commit 870131f

Browse files
authored
Compact show, fix #75 (#93)
1 parent 8519599 commit 870131f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Parameters.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,13 @@ function with_kw(typedef, mod::Module, withshow=true)
536536
pack_name_depr = Symbol("pack_"*string(tn))
537537
showfn = if withshow
538538
:(function Base.show(io::IO, p::$tn)
539+
if get(io, :compact, false) || get(io, :typeinfo, nothing)==$tn
540+
Base.show_default(IOContext(io, :limit => true), p)
541+
else
539542
# just dumping seems to give ok output, in particular for big data-sets:
540543
dump(IOContext(io, :limit => true), p, maxdepth=1)
541-
end)
544+
end
545+
end)
542546
else
543547
:nothing
544548
end

0 commit comments

Comments
 (0)