Re: [Haskell-cafe] [iteratee] empty chunk as special case of input

2011-07-14 Thread Sergey Mironov
2011/7/14 John Lato jwl...@gmail.com: Sorry for the followup, but I forgot about one other important reason (probably the real reason) for the nullC case in bindIteratee.  Note what happens in the regular case: the iteratee is run, and if it's in a completed state, the result is passed to the

[Haskell-cafe] [iteratee] empty chunk as special case of input

2011-07-13 Thread Sergey Mironov
Hi community, hi John. I find myself reading bindIteratee[1] function for a several days.. there is something that keeps me away from completely understanding of the concept. The most noticeble thing is \nullC\ guard in the definition. To demonstate the consequences of this solution, let me define

Re: [Haskell-cafe] [iteratee] empty chunk as special case of input

2011-07-13 Thread John Lato
Hi Sergey, iteratee (the package) uses a null chunk to signify that no further stream data is available within the iteratee, that is, at some point the stream has been entirely consumed. Therefore, if any of the composed iteratees haven't run to completion, they need to get more data from an

Re: [Haskell-cafe] [iteratee] empty chunk as special case of input

2011-07-13 Thread John Lato
Sorry for the followup, but I forgot about one other important reason (probably the real reason) for the nullC case in bindIteratee. Note what happens in the regular case: the iteratee is run, and if it's in a completed state, the result is passed to the bound function (in the m_done line), which