Skip to content

Commit 92edeaa

Browse files
committed
def show
1 parent 76f5ee3 commit 92edeaa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/blockedtuple.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ function Base.map(f, bt::AbstractBlockTuple)
5555
return widened_constructorof(typeof(bt))(map(f, Tuple(bt)), Val(BL))
5656
end
5757

58+
function Base.show(io::IO, bt::AbstractBlockTuple)
59+
return print(io, nameof(typeof(bt)), blocks(bt))
60+
end
61+
function Base.show(io::IO, ::MIME"text/plain", bt::AbstractBlockTuple)
62+
println(io, typeof(bt))
63+
return print(io, blocks(bt))
64+
end
65+
5866
# Broadcast interface
5967
Base.broadcastable(bt::AbstractBlockTuple) = bt
6068
struct AbstractBlockTupleBroadcastStyle{BlockLengths,BT} <: Broadcast.BroadcastStyle end

0 commit comments

Comments
 (0)