diff --git a/src/Batches/batch.jl b/src/Batches/batch.jl index e8b0bd75..53cacf00 100644 --- a/src/Batches/batch.jl +++ b/src/Batches/batch.jl @@ -11,12 +11,6 @@ Batch(xs) = Batch(Storage(xs)) convert{T,S}(::Type{Batch{T,S}},storage::S) = Batch{T,S}(storage) -@render Juno.Inline b::Batch begin - Tree(Row(Text("Batch of "), eltype(b), - Juno.fade("[$(length(b))]")), - Juno.trim(collect(b))) -end - # TODO: figure out how to express this as a generic convert function rebatch(xs) dims = ndims(xs)-1 @@ -48,12 +42,6 @@ Seq(xs) = Seq(Storage(xs)) convert{T,S}(::Type{Seq{T,S}},storage::S) = Seq{T,S}(storage) -@render Juno.Inline b::Seq begin - Tree(Row(Text("Seq of "), eltype(b), - Juno.fade("[$(length(b))]")), - Juno.trim(collect(b))) -end - BatchSeq{T<:Seq} = Batch{T} function rebatchseq(xs) diff --git a/src/Batches/catmat.jl b/src/Batches/catmat.jl index f651faff..c39ff7e7 100644 --- a/src/Batches/catmat.jl +++ b/src/Batches/catmat.jl @@ -46,8 +46,12 @@ function Storage(xs) Storage{eltype(xs)}(xs) end -@render Juno.Inline b::Storage begin - Tree(Row(Text("Storage of "), eltype(b), +typename(b::Type) = b +typename(b::Type{<:BatchLike}) = + Row(Juno.typ("$(b.name.name)"), text"{", typename(eltype(b)), text"}") + +@render Juno.Inline b::BatchLike begin + Tree(Row(typename(typeof(b)), Juno.fade("[$(length(b))]")), Juno.trim(collect(b))) end