diff --git a/prototype/Doubt/Equatable.swift b/prototype/Doubt/Equatable.swift index 34cfd49e7..e134da62d 100644 --- a/prototype/Doubt/Equatable.swift +++ b/prototype/Doubt/Equatable.swift @@ -60,3 +60,14 @@ public func == (left: Doc, right: Doc) -> Bool { return false } } + +public func == (left: Vertex, right: Vertex) -> Bool { + switch (left, right) { + case (.End, .End): + return true + case let (.XY(a, x1, y1), .XY(b, x2, y2)): + return a == b && x1.value == y1.value && x2.value == y2.value + default: + return false + } +}