diff --git a/prototype/Doubt/Location.swift b/prototype/Doubt/Location.swift index b1f49f395..0ee7ebea5 100644 --- a/prototype/Doubt/Location.swift +++ b/prototype/Doubt/Location.swift @@ -1,4 +1,11 @@ -public enum Location { +public enum Location: Equatable { /// A literal string, vs. range information. case Literal(String) } + +public func == (left: Location, right: Location) -> Bool { + switch (left, right) { + case let (.Literal(s1), .Literal(s2)): + return s1 == s2 + } +}