From f30d2d609a08faaa82ca7cc205d001efa911288d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 09:43:51 -0400 Subject: [PATCH] Remove Syntax hashing. --- prototype/Doubt/Syntax.swift | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/prototype/Doubt/Syntax.swift b/prototype/Doubt/Syntax.swift index 2a7c47924..71718537f 100644 --- a/prototype/Doubt/Syntax.swift +++ b/prototype/Doubt/Syntax.swift @@ -71,28 +71,6 @@ public func == (left: Syntax, right: Syntax Hash, ifRecur: Recur -> Hash) -> Hash { - switch self { - case let .Leaf(n): - return Hash("Leaf", ifLeaf(n)) - case let .Indexed(x): - return Hash("Indexed", .Ordered(x.map(ifRecur))) - case let .Keyed(d): - return Hash("Keyed", .Ordered(d.keys.sort().map { Hash($0, ifRecur(d[$0]!)) })) - } - } -} - -extension Syntax where Recur: Hashable, A: Hashable { - public var hash: Hash { - return hash(ifLeaf: Hash.init, ifRecur: Hash.init) - } -} - - // MARK: - JSON extension Syntax {