On Sat, 2015-01-31 at 04:53, i.costi...@me.com wrote:
> I've got lots of multi-field types in a package I'm developing 
> <https://github.com/imanuelcostigan/FinancialMarkets.jl> and would like to 
> understand how I might best show() them optimally. The default method 
> applied to some types prints what is effectively unreadable garbage to the 
> REPL. Has someone else successfully dealt with this?

Try overloading Base.show

something like:

function Base.show(io::IO, mt::MyType)
    print(io, "My type with field $(mt.fld1)")
end

Reply via email to