Portability | portable |
---|---|
Stability | stable |
Maintainer | mukai@jmuk.org |
Parsers for IMAP server responses
- type Mailbox = String
- type UID = Word64
- type Charset = String
- data MailboxInfo = MboxInfo {
- _mailbox :: Mailbox
- _exists :: Integer
- _recent :: Integer
- _flags :: [Flag]
- _permanentFlags :: [Flag]
- _isWritable :: Bool
- _isFlagWritable :: Bool
- _uidNext :: UID
- _uidValidity :: UID
- data Flag
- data Attribute
- data MboxUpdate = MboxUpdate {}
- data StatusCode
- = ALERT
- | BADCHARSET [Charset]
- | CAPABILITY_sc [String]
- | PARSE
- | PERMANENTFLAGS [Flag]
- | READ_ONLY
- | READ_WRITE
- | TRYCREATE
- | UIDNEXT_sc UID
- | UIDVALIDITY_sc UID
- | UNSEEN_sc Integer
- data ServerResponse
- = OK (Maybe StatusCode) String
- | NO (Maybe StatusCode) String
- | BAD (Maybe StatusCode) String
- | PREAUTH (Maybe StatusCode) String
- data MailboxStatus
- = MESSAGES
- | RECENT
- | UIDNEXT
- | UIDVALIDITY
- data RespDerivs = RespDerivs {
- dvFlags :: Result RespDerivs [Flag]
- advTag :: Result RespDerivs String
- advChar :: Result RespDerivs Char
- advPos :: Pos
- eval :: (RespDerivs -> Result RespDerivs r) -> String -> ByteString -> r
- parse :: String -> Pos -> ByteString -> RespDerivs
- eval' :: (RespDerivs -> Result RespDerivs r) -> String -> String -> r
- parse' :: String -> Pos -> String -> RespDerivs
- pNone :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, ())
- pCapability :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [String])
- pList :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, Mailbox)])
- pLsub :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, Mailbox)])
- pStatus :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(MailboxStatus, Integer)])
- pExpunge :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [Integer])
- pSearch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [UID])
- pSelect :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, MailboxInfo)
- pFetch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(Integer, [(String, String)])])
- pDone :: RespDerivs -> Result RespDerivs ServerResponse
- pFlag :: Parser RespDerivs Flag
- pParenFlags :: RespDerivs -> Result RespDerivs [Flag]
- atomChar :: Derivs d => Parser d Char
- pNumberedLine :: String -> Parser RespDerivs Integer
- pRecentLine :: Parser RespDerivs Integer
- pExpungeLine :: Parser RespDerivs Integer
- pExistsLine :: Parser RespDerivs Integer
- pOtherLine :: Parser RespDerivs (Either (String, Integer) b)
- pCapabilityLine :: Parser RespDerivs (Either a [String])
- pListLine :: String -> Parser RespDerivs (Either a ([Attribute], String, Mailbox))
- pStatusLine :: Parser RespDerivs (Either a [(MailboxStatus, Integer)])
- pSearchLine :: Parser RespDerivs (Either a [UID])
- pSelectLine :: Parser RespDerivs (MailboxInfo -> MailboxInfo)
- pFetchLine :: Parser RespDerivs (Either a (Integer, [(String, String)]))
- crlf :: String
- crlfP :: Derivs d => Parser d String
- lookups :: Eq a => a -> [(a, b)] -> [b]
- catRights :: [Either a b] -> [b]
- catLefts :: [Either a b] -> [a]
- isRight :: Either a b -> Bool
- isLeft :: Either a b -> Bool
- getLeft :: Either a b -> a
- getRight :: Either a b -> b
Documentation
data MailboxInfo Source
MboxInfo | |
|
data MboxUpdate Source
data StatusCode Source
data ServerResponse Source
data MailboxStatus Source
the query data type for the status command
MESSAGES | the number of messages in the mailbox |
RECENT | the number of messages with the Recent flag set |
UIDNEXT | the next unique identifier value of the mailbox |
UIDVALIDITY | the unique identifier validity value of the mailbox |
data RespDerivs Source
RespDerivs | |
|
Derivs RespDerivs |
eval :: (RespDerivs -> Result RespDerivs r) -> String -> ByteString -> rSource
parse :: String -> Pos -> ByteString -> RespDerivsSource
eval' :: (RespDerivs -> Result RespDerivs r) -> String -> String -> rSource
parse' :: String -> Pos -> String -> RespDerivsSource
pNone :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, ())Source
pCapability :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [String])Source
pList :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, Mailbox)])Source
pLsub :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [([Attribute], String, Mailbox)])Source
pStatus :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(MailboxStatus, Integer)])Source
pExpunge :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [Integer])Source
pSearch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [UID])Source
pSelect :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, MailboxInfo)Source
pFetch :: RespDerivs -> Result RespDerivs (ServerResponse, MboxUpdate, [(Integer, [(String, String)])])Source
pDone :: RespDerivs -> Result RespDerivs ServerResponseSource
pFlag :: Parser RespDerivs FlagSource
pParenFlags :: RespDerivs -> Result RespDerivs [Flag]Source
pNumberedLine :: String -> Parser RespDerivs IntegerSource
pRecentLine :: Parser RespDerivs IntegerSource
pExpungeLine :: Parser RespDerivs IntegerSource
pExistsLine :: Parser RespDerivs IntegerSource
pOtherLine :: Parser RespDerivs (Either (String, Integer) b)Source
pCapabilityLine :: Parser RespDerivs (Either a [String])Source
pStatusLine :: Parser RespDerivs (Either a [(MailboxStatus, Integer)])Source
pSearchLine :: Parser RespDerivs (Either a [UID])Source
pSelectLine :: Parser RespDerivs (MailboxInfo -> MailboxInfo)Source
pFetchLine :: Parser RespDerivs (Either a (Integer, [(String, String)]))Source