Re: [Haskell-cafe] Re: Space usage problems

2006-01-17 Thread Ian Lynagh
Hi Bulat, On Wed, Jan 18, 2006 at 12:10:45AM +0300, Bulat Ziganshin wrote: > > Monday, January 16, 2006, 12:52:42 AM, you wrote: > > IL> OK, I have one library which provides > > IL> inflate :: [Word8] -- The input > IL> -> ([Word8], -- A prefix of the input inflated (uncompr

Re[2]: [Haskell-cafe] Re: Space usage problems

2006-01-17 Thread Bulat Ziganshin
Hello Ian, Monday, January 16, 2006, 12:52:42 AM, you wrote: IL> OK, I have one library which provides IL> inflate :: [Word8] -- The input IL> -> ([Word8], -- A prefix of the input inflated (uncompressed) IL> [Word8]) -- The remainder of the input you can use s

Re: [Haskell-cafe] Re: Space usage problems

2006-01-15 Thread Ian Lynagh
On Wed, Jan 11, 2006 at 03:00:45PM +, Simon Marlow wrote: > Ian Lynagh wrote: > >On Wed, Jan 11, 2006 at 10:36:47AM +, Simon Marlow wrote: > > > >>My suggestion: don't use the lazy state monad if you can help it. > > > >But a strict state monad would force everything to be loaded into memor

[Haskell-cafe] Re: Space usage problems

2006-01-11 Thread Simon Marlow
Ian Lynagh wrote: On Wed, Jan 11, 2006 at 10:36:47AM +, Simon Marlow wrote: My suggestion: don't use the lazy state monad if you can help it. But a strict state monad would force everything to be loaded into memory at once, right? What would you suggest I use instead? I'm not sure - ca

Re: [Haskell-cafe] Re: Space usage problems

2006-01-11 Thread Ian Lynagh
On Wed, Jan 11, 2006 at 10:36:47AM +, Simon Marlow wrote: > > My suggestion: don't use the lazy state monad if you can help it. But a strict state monad would force everything to be loaded into memory at once, right? What would you suggest I use instead? Or do I just have to tread carefully

[Haskell-cafe] Re: Space usage problems

2006-01-11 Thread Simon Marlow
Ian Lynagh wrote: On Tue, Jan 10, 2006 at 04:44:33PM +, Ian Lynagh wrote: readChunks :: FirstMonad String readChunks = do xs <- get if null xs then return [] else do let (ys, zs) = foo xs put zs