diff options
author | tv <tv@shackspace.de> | 2015-03-08 15:19:13 +0100 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-03-08 15:19:13 +0100 |
commit | 6ba8281b5d87f1dd15a9b608aa82f9a883d00543 (patch) | |
tree | 0d3e4bb479f454b9d8af17b46aaac76ff1c18374 /Notmuch/Message.hs | |
parent | 74f1d114945f5bc384e5690f60f539e2d32d27d1 (diff) |
test5 attachFilesToDraft: use ExcepT
Diffstat (limited to 'Notmuch/Message.hs')
-rw-r--r-- | Notmuch/Message.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Notmuch/Message.hs b/Notmuch/Message.hs index dd1e809..8c3d1ed 100644 --- a/Notmuch/Message.hs +++ b/Notmuch/Message.hs @@ -105,7 +105,9 @@ instance FromJSON Message where parseJSON (Array _) = return $ Message (MessageID "") defTime M.empty [] True False [] "" where defTime = UTCTime (ModifiedJulianDay 0) (fromInteger 0) parseJSON x = fail $ "Error parsing message: " ++ show x - + +hasTag :: T.Text -> Message -> Bool +hasTag tag = (tag `elem`) . messageTags |