diff --git a/src/precompile.jl b/src/precompile.jl index 83810a7..7666104 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -29,5 +29,12 @@ function _precompile_() precompile(Tuple{typeof(convert),Type{T},S}) precompile(Tuple{typeof(convert),Type{S},T}) end + # display in the terminal, into pipes and into buffers (e.g. `repr`) + for IOT in (IOContext{Base.TTY}, IOContext{Base.PipeEndpoint}, IOContext{IOBuffer}, IOBuffer) + precompile(Tuple{typeof(show),IOT,T}) + precompile(Tuple{typeof(print),IOT,T}) + precompile(Tuple{typeof(show),IOT,MIME"text/plain",T}) + precompile(Tuple{typeof(show),IOT,MIME"text/plain",Vector{T}}) + end end end