On Thu, Feb 24, 2011 at 2:42 PM, Andrew Coppin
<andrewcop...@btinternet.com>wrote:

>    Anybody have any hints on how to get around this?
>>
>> Use a lazy state monad?
>>
>
> That's not going to work. It still needs to read the input to determine
> which monadic action comes next, and hence what the final result will be. So
> whether it forces the result or not, it still has to scan the entire input
> before it can generate any output.
>
>
>From the sound of it, you want some kind of lazy IO, driven/generated by a
state monad.  Check out the "safe-lazy-io".  I've never used it, but the
announcement is pretty convincing.
http://www.haskell.org/pipermail/haskell/2009-March/021133.html
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to