Skip to content

Commit

Permalink
Better printing
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo committed Nov 2, 2018
1 parent 9cf1465 commit e25e02a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/BoundedLattice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ boundary(::T) where {T <: BoundedLattice} = boundary(T)

nameof(::BoundedLattice) = "Bounded Lattice"

show(io::IO, lattice::BoundedLattice) = print(io, "$(nameof(lattice)):\n $(boundary(lattice)) boundary\n size: $(size(lattice))")
function show(io::IO, lattice::BoundedLattice)
align = get(io, :align, 0)
println(io, " " * align, nameof(lattice))
println(io, " " * align, "boundary: ", boundary(lattice))
println(io, " " * align, "size: ", size(lattice))
end

0 comments on commit e25e02a

Please sign in to comment.