1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 21:43:07 +03:00

Algebraic hashing over cofrees of Hashable types.

This commit is contained in:
Rob Rix 2015-10-14 10:57:25 -04:00
parent db57734586
commit e70cbe4235

View File

@ -87,5 +87,11 @@ extension Cofree {
}
}
extension Cofree where A: Hashable, B: Hashable {
public var hash: Hash {
return hash(annotation: Hash.init, leaf: Hash.init)
}
}
import Prelude