From 6ba8281b5d87f1dd15a9b608aa82f9a883d00543 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Mar 2015 15:19:13 +0100 Subject: test5 attachFilesToDraft: use ExcepT --- Notmuch/Message.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Notmuch') 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 -- cgit v1.2.3