Skip to content

Commit

Permalink
Merge 92e3588 into 5c8deea
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonGrodin committed May 13, 2019
2 parents 5c8deea + 92e3588 commit d4a8454
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ end
(x::Variable)(args...) = Operation(x, collect(Expression, args))

Base.isequal(x::Variable, y::Variable) = (x.name, x.known) == (y.name, y.known)
Base.print(io::IO, x::Variable) = show(io, x)
Base.show(io::IO, x::Variable) = print(io, x.name)
function Base.show(io::IO, ::MIME"text/plain", x::Variable)
known = x.known ? "known" : "unknown"
print(io, x.name, " (callable ", known, " variable)")
end


struct Constant <: Expression
Expand Down

0 comments on commit d4a8454

Please sign in to comment.