-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Read and write standard mailbox files.
--
-- Read and write standard mailbox (mboxrd) files.
@package mbox
@version 0.2
-- | Reads and writes mboxrd files as per
-- http://www.qmail.org/man/man5/mbox.html.
module Data.MBox.String
type MBox = [Message]
data Message
Message :: String -> [Header] -> String -> Message
fromLine :: Message -> String
headers :: Message -> [Header]
body :: Message -> String
type Header = (String, String)
-- | Reads a string as an mbox file.
parseMBox :: String -> MBox
-- | Attempts to retrieve the contents of a forwarded message from an
-- enclosing message.
parseForward :: Message -> Message
-- | Reads a date header as a UTCTime
parseDateHeader :: String -> Maybe UTCTime
-- | Renders an individual message into a String.
showMessage :: Message -> String
-- | Renders an MBox into a String
showMBox :: MBox -> String
getHeader :: (Header -> Bool) -> Message -> String
-- | Header accessors
isID :: Header -> Bool
isDate :: Header -> Bool
instance Read Message
instance Show Message
-- | Reads and writes mboxrd files as per
-- http://www.qmail.org/man/man5/mbox.html.
module Data.MBox
type MBox = [Message]
data Message
Message :: Text -> [Header] -> Text -> Message
fromLine :: Message -> Text
headers :: Message -> [Header]
body :: Message -> Text
type Header = (Text, Text)
-- | Parses Text as an mbox file.
parseMBox :: Text -> MBox
-- | Attempts to retrieve the contents of a forwarded message from an
-- enclosing message.
parseForward :: Message -> Message
-- | Reads a date header as a UTCTime
parseDateHeader :: Text -> Maybe UTCTime
-- | Renders an individual message into Text.
showMessage :: Message -> Text
-- | Renders an MBox into Text
showMBox :: MBox -> Text
-- | Return the values of headers for which predicate is True
getHeader :: (Header -> Bool) -> Message -> Text
-- | Return True if header is a Message-ID header.
isID :: Header -> Bool
-- | Return True if header is a Date header.
isDate :: Header -> Bool
instance Read Message
instance Show Message