Skip to content

Commit

Permalink
symbol: add Base.show (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin authored and pluskid committed Nov 6, 2017
1 parent 41f8f55 commit 9fcab40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/symbolic-node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ function get_name(self :: mx.SymbolicNode)
return Symbol(unsafe_string(name[]))
end

Base.show(io::IO, sym::SymbolicNode) =
print(io, "$(typeof(sym)) $(get_name(sym))")

import Base: print

function print(io :: IO, sym :: SymbolicNode)
Expand Down

0 comments on commit 9fcab40

Please sign in to comment.