Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Donn Cave
Quoth Manfred Lotz , > In the end the only thing I need is to get the full message because I > want to feed bogofilter to learn that a message is ham or spam. > > For the time being I decided to write my own program to fetch the data > because it is a good exercise for a Haskell beginner as I am.

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Manfred Lotz
On Wed, 27 Jul 2011 09:47:52 -0700 (PDT) Donn Cave wrote: > Quoth Manfred Lotz , > ... > > The problem seems to lie in the HaskellNet package. If for example I > > only fetch a specific message > >m <- fetch con 2092 > > having a size of some 1.2m then I get the same stack overflow. > > > >

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Robert Wills
Hello, I guess I should stick my hand up as the supposed maintainer of HaskellNet. Unfortunately I can't say that I know the code that well. Two years ago I rescued it from bitrot cabalized it and when I couldn't get any response from the original author put myself down as the maintainer. It is

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Donn Cave
Quoth Manfred Lotz , ... > The problem seems to lie in the HaskellNet package. If for example I > only fetch a specific message >m <- fetch con 2092 > having a size of some 1.2m then I get the same stack overflow. > > If at runtime I specify +RTS -K40M -RTS it works but takes over 40 > seconds

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Manfred Lotz
On Tue, 26 Jul 2011 14:17:08 -0700 (PDT) Donn Cave wrote: > Quoth Manfred Lotz , > ... > > I'm not quite sure I understand what you mean. Stack overflow comes > > from this: > > forM_ msgs (\x -> fetch con x >>= print) > > > > If I change it to: > > mapM_ (\x -> fetch con x >>= p

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Ivan Lazar Miljenovic
On 27 July 2011 17:56, Paul R wrote: > > Hem hem ... I should never try to write anything sensible before putting > my thick glasses. -w does not turn ON all warnings, but turns them OFF, > so my previous comment regarding swapping its definition with -Wall is > just nonsense. Sorry for the noise.

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Paul R
Hem hem ... I should never try to write anything sensible before putting my thick glasses. -w does not turn ON all warnings, but turns them OFF, so my previous comment regarding swapping its definition with -Wall is just nonsense. Sorry for the noise. Still, do you think there could be room for a

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Ivan Lazar Miljenovic
On 27 July 2011 17:42, Paul R wrote: This should be mapM_ and 'ghc -Wall' spots this problem since 6.12. > >>> The compiler (7.04) doesn't tell me anything about it. > > Henning> It seems that it is no longer part of -Wall. > > Indeed, that's not part of -Wall. > >  http://www.haskell.org/ghc

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-27 Thread Paul R
>>> This should be mapM_ and 'ghc -Wall' spots this problem since 6.12. >> The compiler (7.04) doesn't tell me anything about it. Henning> It seems that it is no longer part of -Wall. Indeed, that's not part of -Wall. http://www.haskell.org/ghc/docs/7.0.4/html/users_guide/options-sanity.html

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-26 Thread Henning Thielemann
On Tue, 26 Jul 2011, Manfred Lotz wrote: main = do s> > 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. The compiler (7.04) doesn't tell me anything about it. It seems that it

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-26 Thread Donn Cave
Quoth Manfred Lotz , ... > I'm not quite sure I understand what you mean. Stack overflow comes > from this: > forM_ msgs (\x -> fetch con x >>= print) > > If I change it to: > mapM_ (\x -> fetch con x >>= print) msgs > > there is the same stack overflow. I didn't understand that m

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-26 Thread Manfred Lotz
On Tue, 26 Jul 2011 10:17:22 +0200 (CEST) Henning Thielemann wrote: > > 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 >

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-26 Thread Henning Thielemann
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.mai

[Haskell-cafe] Stack space overflow in HaskellNet

2011-07-25 Thread Manfred Lotz
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