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:
parent
db57734586
commit
e70cbe4235
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user