Skip to content

Commit

Permalink
Compact show, fix #75 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro3 authored Dec 12, 2018
1 parent 8519599 commit 870131f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,13 @@ function with_kw(typedef, mod::Module, withshow=true)
pack_name_depr = Symbol("pack_"*string(tn))
showfn = if withshow
:(function Base.show(io::IO, p::$tn)
if get(io, :compact, false) || get(io, :typeinfo, nothing)==$tn
Base.show_default(IOContext(io, :limit => true), p)
else
# just dumping seems to give ok output, in particular for big data-sets:
dump(IOContext(io, :limit => true), p, maxdepth=1)
end)
end
end)
else
:nothing
end
Expand Down

0 comments on commit 870131f

Please sign in to comment.