diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-09-03 15:39:46 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-09-03 15:39:46 -0300 |
commit | c91af8d1f85f876eb7119ce8406385cf570d3886 (patch) | |
tree | ed8fd1e3ed0c33cb07bc79862dfed4424b3eb4af /Types.hs | |
parent | de8bde7be0a8ab99dbbf5cdbf6e5fc7fc582da01 (diff) |
Fixed file descriptor leak
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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) |