
26 Jul
2011
26 Jul
'11
4:17 a.m.
On Mon, 25 Jul 2011, Manfred Lotz wrote:
Hi there, If I take example imap.hs
import System.IO import Network.HaskellNet.IMAP import Text.Mime import qualified Data.ByteString.Char8 as BS import Control.Monad
-- the next lines were changed to fit to my local imap server imapServer = "imap.mail.org" user = "" pass = ""
main = do con <- connectIMAP imapServer login con user pass mboxes <- list con mapM print mboxes
This should be mapM_ and 'ghc -Wall' spots this problem since 6.12.
select con "INBOX" msgs <- search con [ALLs] mapM_ (\x -> print x) (take 4 msgs) forM_ (take 4msgs) (\x -> fetch con x >>= print)