1
1
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:
Rob Rix 2015-09-29 12:48:13 -04:00
parent 8c1b249df2
commit 1bb9cbbbd4

View File

@ -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)):