aboutsummaryrefslogtreecommitdiff
path: root/src/Lazymail/Email.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-05 23:52:04 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-05 23:52:04 -0300
commit41b16df2db3920b59d1c13a468e848e68111058b (patch)
treec91ec22759cd594405e185db687e3c8ccd8feacb /src/Lazymail/Email.hs
parent4f9e2732d8c19bcb731f82d590436f5a3168ec8d (diff)
Code clean-up
Diffstat (limited to 'src/Lazymail/Email.hs')
-rw-r--r--src/Lazymail/Email.hs65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/Lazymail/Email.hs b/src/Lazymail/Email.hs
index fc63a89..adc9d3e 100644
--- a/src/Lazymail/Email.hs
+++ b/src/Lazymail/Email.hs
@@ -65,68 +65,3 @@ lookupField' n ns =
unwrapField = maybe "" id
lookupField n ns = unwrapField $ lookupField' n ns
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{-import Text.Parsec.Error(ParseError)
-import Text.ParserCombinators.Parsec (parse)
-import Text.ParserCombinators.Parsec.Rfc2822
-
-parseEmail :: String -> Message
-parseEmail msg = unwrapEmail $ parse message "<stdin>" $ fixEol msg
-
-unwrapEmail (Right email) = email
-getFields (Message fs _) = fs
-
--- There is obviously a pattern here. Find a way to narrow it down.
-getReturnPath fs = do { ReturnPath f <- fs; f }
-getFrom fs = do { From f <- fs; f }
-getTo fs = do { To f <- fs; f }
-getCc fs = do { Cc f <- fs; f }
-getBcc fs = do { Bcc f <- fs; f }
-getReplyTo fs = do { ReplyTo f <- fs; f }
-getSubject fs = do { Subject f <- fs; f }
-getMessageID fs = do { MessageID f <- fs; f }
-getInReplyTo fs = do { InReplyTo f <- fs; f }
-getReferences fs = do { References f <- fs; f }
-getComments fs = do { Comments f <- fs; f }
-getKeywords fs = do { Keywords f <- fs; f }
---getDate fs = do { Date f <- fs; f }
---getResentDate fs = do { ResentDate f <- fs; f }
-getResentFrom fs = do { ResentFrom f <- fs; f }
---getResentSender fs = do { ResentSender f <- fs; f }
-getResentTo fs = do { ResentTo f <- fs; f }
-getResentCc fs = do { ResentCc f <- fs; f }
-getResentBcc fs = do { ResentBcc f <- fs; f }
-getResentMessageID fs = do { ResentMessageID f <- fs; f }
---getReceived fs = do { Received f <- fs; f }
-
-getBody (Message _ []) = "Empty body"
-getBody (Message _ body) = body
-
--- Make sure all lines are terminated by CRLF.
-fixEol :: String -> String
-fixEol ('\r':'\n':xs) = '\r' : '\n' : fixEol xs
-fixEol ('\n':xs) = '\r' : '\n' : fixEol xs
-fixEol (x:xs) = x : fixEol xs
-fixEol [] = []-}
nihil fit ex nihilo