1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Remove Free hashing.

This commit is contained in:
Rob Rix 2015-10-15 09:43:27 -04:00
parent 8b5a269d5e
commit 1cbc04100d

View File

@ -144,22 +144,6 @@ public func == <A: Equatable, B: Equatable> (left: Free<A, B>, right: Free<A, B>
}
// MARK: - Hashing
extension Free {
public func hash(ifPure ifPure: B -> Hash, ifRoll: A -> Hash) -> Hash {
return analysis(ifPure: ifPure, ifRoll: { $0.hash(ifLeaf: ifRoll, ifRecur: { $0.hash(ifPure: ifPure, ifRoll: ifRoll) }) })
}
}
extension Free where A: Hashable, B: Hashable {
public var hash: Hash {
return hash(ifPure: Hash.init, ifRoll: Hash.init)
}
}
// MARK: - JSON
extension Free {