diff options
| author | tv <tv@shackspace.de> | 2014-12-24 22:29:04 +0100 |
|---|---|---|
| committer | tv <tv@shackspace.de> | 2014-12-24 22:29:04 +0100 |
| commit | a56c3aa47d78764ecd6eadfa249c5fc8b0a83346 (patch) | |
| tree | 77fc6d24ece8cb99c0d5623f4438af60f16a5c0b | |
| parent | 9a76b01e2afa0523e3c55e00058b553f41150d69 (diff) | |
custom instance Eq SearchResult
| -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" |
