iteratee use of ListLike in (was Re: 0.3, 0.4 plans, pending patches)

Conrad Parker conrad.parker at tsurucapital.com
Fri Aug 20 05:33:36 EDT 2010


On 17 August 2010 19:25, John Lato <jwlato at gmail.com> wrote:
> Finally, do you have an opinion on ListLike?  Have you mostly used
> ByteStrings for processing, or some other element type?  I would be most
> interested to know what would be useful in terms of operations on data
> chunks.

I mostly use ByteStrings for input processing, then have a series of
enumeratees that transform the stream of Word8 into a stream of
records, and then into a stream of groups of related records. We are
using plain lists (eg. [Record]) for those streams though. The
ListLike interface does make it quite easy to think more generally
about what we are doing.

Generally though we are simply stepping through the streams with head,
or running an action over them with mapM_.

I just looked over Data/Iteratee/ListLike.hs in the 0.4 branch, and I
do get the feeling that the functions don't always have the same
semantics as their similarly-named Data.List or ListLike functions.
For example, head is really more like a zipper's right function.

Conrad.



More information about the Iteratee mailing list