aboutsummaryrefslogtreecommitdiff
path: root/Types.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-03 15:39:46 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-03 15:39:46 -0300
commitc91af8d1f85f876eb7119ce8406385cf570d3886 (patch)
treeed8fd1e3ed0c33cb07bc79862dfed4424b3eb4af /Types.hs
parentde8bde7be0a8ab99dbbf5cdbf6e5fc7fc582da01 (diff)
Fixed file descriptor leak
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Types.hs b/Types.hs
index 86ca334..c5e9428 100644
--- a/Types.hs
+++ b/Types.hs
@@ -12,6 +12,7 @@ import Control.Monad.Reader(ReaderT)
import Control.Monad.State(StateT)
import Data.DateTime(DateTime)
import System.FilePath(FilePath)
+import System.IO(Handle)
import UI.NCurses(Curses, Update, Color(..), ColorID)
type LazymailUpdate = ReaderT LazymailConfig (StateT LazymailState Update)
@@ -36,16 +37,17 @@ data LazymailConfig = LazymailConfig {
}
data Email = Email {
- emailValue :: MIMEValue
- , emailDate :: DateTime
- , emailPath :: FilePath
+ emailValue :: MIMEValue
+ , emailDate :: DateTime
+ , emailPath :: FilePath
+ , emailHandle :: Handle
}
instance Eq Email where
- (Email _ _ fp1) == (Email _ _ fp2) = fp1 == fp2
+ (Email _ _ fp1 _) == (Email _ _ fp2 _) = fp1 == fp2
instance Ord Email where
- (Email _ d1 _) `compare` (Email _ d2 _) = d1 `compare` d2
+ (Email _ d1 _ _) `compare` (Email _ d2 _ _) = d1 `compare` d2
data Mode = MaildirMode | IndexMode | EmailMode | ComposeMode
deriving (Show, Eq)
nihil fit ex nihilo