summaryrefslogtreecommitdiffstats
path: root/Notmuch/SearchResult.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-12-24 22:29:04 +0100
committertv <tv@shackspace.de>2014-12-24 22:29:04 +0100
commita56c3aa47d78764ecd6eadfa249c5fc8b0a83346 (patch)
tree77fc6d24ece8cb99c0d5623f4438af60f16a5c0b /Notmuch/SearchResult.hs
parent9a76b01e2afa0523e3c55e00058b553f41150d69 (diff)
custom instance Eq SearchResult
Diffstat (limited to 'Notmuch/SearchResult.hs')
-rw-r--r--Notmuch/SearchResult.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Notmuch/SearchResult.hs b/Notmuch/SearchResult.hs
index 164c5b3..3dbf6bc 100644
--- a/Notmuch/SearchResult.hs
+++ b/Notmuch/SearchResult.hs
@@ -25,7 +25,13 @@ data SearchResult = SearchResult {
, searchMatched :: Int
, searchTotal :: Int
}
- deriving (Show,Eq)
+ deriving (Show)
+
+
+instance Eq SearchResult where
+ s1 == s2 =
+ searchThread s1 == searchThread s2
+
instance FromJSON SearchResult where
parseJSON (Object v) = SearchResult <$> v .: "thread"