[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:02:42 UTC 2010
The following commit has been merged in the master branch:
commit 56624b23a8fff5cacc8f54e55f97f90bc6cc8d2c
Author: John Goerzen <jgoerzen at complete.org>
Date: Fri Sep 30 20:52:51 2005 +0100
Added MissingH.Email.Mailbox
diff --git a/MissingH.cabal b/MissingH.cabal
index ce0f678..be9baea 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -7,6 +7,7 @@ Stability: Alpha
Copyright: Copyright (c) 2004-2005 John Goerzen
Exposed-Modules: MissingH.IO, MissingH.IO.Binary, MissingH.List,
MissingH.Daemon,
+ MissingH.Email.Mailbox,
MissingH.Logging, MissingH.Logging.Handler,
MissingH.Logging.Handler.Simple, MissingH.Logging.Handler.Syslog,
MissingH.Logging.Logger,
diff --git a/MissingH/Email/Mailbox.hs b/MissingH/Email/Mailbox.hs
new file mode 100644
index 0000000..3e23fde
--- /dev/null
+++ b/MissingH/Email/Mailbox.hs
@@ -0,0 +1,64 @@
+{-
+Copyright (C) 2005 John Goerzen <jgoerzen at complete.org>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-}
+
+{- |
+ Module : MissingH.Email.Mailbox
+ Copyright : Copyright (C) 2005 John Goerzen
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John Goerzen,
+ Maintainer : jgoerzen at complete.org
+ Stability : provisional
+ Portability: portable
+
+General support for e-mail mailboxes
+
+Written by John Goerzen, jgoerzen\@complete.org
+-}
+
+module MissingH.Email.Mailbox(Flag, Message, Flags,
+ MailboxReader,
+ MailboxWriter)
+where
+
+type Message = String
+
+data Flag =
+ SEEN
+ | ANSWERED
+ | FLAGGED
+ | DELETED
+ | DRAFT
+ | OTHERFLAG String
+ deriving (Eq, Show)
+
+type Flags = [Flag]
+
+class (Show a, Show b) => MailboxReader a b where
+ listMessageIDs :: a -> IO [b]
+ listMessageFlags :: a -> IO [(b, Flags)]
+ getAll :: a -> IO [(b, Flags, Message)]
+ getMessages :: a -> [b] -> IO [(b, Flags, Message)]
+
+class (MailboxReader a b) => MailboxWriter a b where
+ appendMessage :: a -> Flags -> Message -> IO b
+ deleteMessages :: a -> [b] -> IO ()
+ addFlags :: a -> [b] -> Flags -> IO ()
+ removeFlags :: a -> [b] -> Flags -> IO ()
+ setFlags :: a -> [b] -> Flags -> IO ()
+
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list