Skip to content

Commit 2b74cd2

Browse files
committed
More friendly Equation printing
1 parent 3aed484 commit 2b74cd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/equations.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct Equation
1414
end
1515
Base.:(==)(a::Equation, b::Equation) = all(isequal.((a.lhs, a.rhs), (b.lhs, b.rhs)))
1616
Base.hash(a::Equation, salt::UInt) = hash(a.lhs, hash(a.rhs, salt))
17+
Base.show(io::IO, eq::Equation) = print(io, eq.lhs, " ~ ", eq.rhs)
1718

1819
SymbolicUtils.simplify(x::Equation; kw...) = simplify(x.lhs; kw...) ~ simplify(x.rhs; kw...)
1920

0 commit comments

Comments
 (0)