mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Empty syntaxes are equatable.
This commit is contained in:
parent
8c1b249df2
commit
1bb9cbbbd4
@ -12,6 +12,8 @@ public func == (left: Term, right: Term) -> Bool {
|
||||
|
||||
public func == <F: Equatable> (left: Syntax<F>, right: Syntax<F>) -> Bool {
|
||||
switch (left, right) {
|
||||
case (.Empty, .Empty):
|
||||
return true
|
||||
case let (.Apply(a, aa), .Apply(b, bb)):
|
||||
return a == b && aa == bb
|
||||
case let (.Abstract(p1, b1), .Abstract(p2, b2)):
|
||||
|
Loading…
Reference in New Issue
Block a user