From 1635b8ab8aea71f00783e8e4f18318a01a46b7e3 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 1 Oct 2015 09:46:02 -0400 Subject: [PATCH] Info is AlgebraicHashable. --- prototype/Doubt/Info.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/prototype/Doubt/Info.swift b/prototype/Doubt/Info.swift index cc9dc46a7..e6b6ab907 100644 --- a/prototype/Doubt/Info.swift +++ b/prototype/Doubt/Info.swift @@ -1,4 +1,4 @@ -public enum Info: Equatable { +public enum Info: AlgebraicHashable { case Literal(String, Set) public var categories: Set { @@ -7,6 +7,13 @@ public enum Info: Equatable { return c } } + + public var hash: Hash { + switch self { + case let .Literal(source, categories): + return Hash("Literal", Hash(source), Hash(categories)) + } + } }