@@ -60,14 +60,19 @@ function Base.showarg(io::IO, tv::TupleVector{T}, toplevel) where T
60
60
toplevel && println (io, " with schema " , schema (T))
61
61
end
62
62
63
- function Base. show (io:: IO , :: MIME"text/plain" , tv:: TupleVector )
63
+ Base. show (io:: IO , :: MIME"text/plain" , tv:: TupleVector ) = show (io, tv)
64
+ Base. show (io:: IO , :: MIME"text/html" , tv:: TupleVector ) = show (io, tv)
65
+
66
+ function Base. show (io:: IO , tv:: TupleVector )
64
67
summary (io, tv)
65
68
print (io, summarize (tv))
66
69
end
67
70
68
- function Base. show (io:: IO , :: MIME"text/html" , tv:: TupleVector )
69
- summary (io, tv)
70
- print (io, summarize (tv))
71
+ function Base. show (io:: IO , :: MIME"text/plain" , v:: Vector{TV} ) where {TV <: TupleVector }
72
+ io = IOContext (io, :compact => true )
73
+ n = length (v)
74
+ println (io, n," -element Vector{$TV }" )
75
+ foreach (v) do tv println (io, summarize (tv)) end
71
76
end
72
77
73
78
function Base. getindex (x:: TupleVector , j)
@@ -97,6 +102,7 @@ function Base.size(tv::TupleVector)
97
102
size (flatten (unwrap (tv))[1 ])
98
103
end
99
104
105
+
100
106
# TODO : Make this pass @code_warntype
101
107
Base. getproperty (tv:: TupleVector , k:: Symbol ) = maybewrap (getproperty (unwrap (tv), k))
102
108
0 commit comments