1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Term is AlgebraicHashable.

This commit is contained in:
Rob Rix 2015-09-29 17:03:18 -04:00
parent 586def93cd
commit 31d35c854b

View File

@ -1,4 +1,4 @@
public enum Term: CustomDebugStringConvertible, CustomDocConvertible, CustomStringConvertible, Equatable {
public enum Term: CustomDebugStringConvertible, CustomDocConvertible, CustomStringConvertible, AlgebraicHashable {
public init(_ out: Syntax<Term>) {
self = .Roll(out)
}
@ -27,6 +27,11 @@ public enum Term: CustomDebugStringConvertible, CustomDocConvertible, CustomStri
}
public var hash: Hash {
return syntax.hash
}
public static var Empty: Term {
return Term(.Empty)
}