struct Info: Categorizable, CustomJSONConvertible, Equatable { init(range: Range, categories: Set) { self.range = range self.categories = categories } init(range: Range, categories: Set) { // FIXME: this is terrible. see also https://github.com/github/semantic-diff/issues/136 self.range = Int(String(range.startIndex))!.. // MARK: Categorizable let categories: Set // MARK: CustomJSONConvertible var JSON: Doubt.JSON { return [ "range": range.JSON, "categories": Array(categories).JSON ] } } func == (left: Info, right: Info) -> Bool { return left.range == right.range && left.categories == right.categories } import Doubt