diff options
-rw-r--r-- | Notmuch/SearchResult.hs | 8 |
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" |