[Haskell-cafe] Iteratee IO examples
ericrasmussen at gmail.com
Fri Jun 24 19:04:23 CEST 2011
Examples are very helpful to me too -- thank you for sharing. I'm especially
curious to see if there are any examples that allow you to use or convert
non-iteratee-based functions. I have only just begun reading about iteratees
and might be missing the point, but it seems like many of the examples so
far rely on explicit recursion or special functions from one of the iteratee
Is there a way to take a simple function (example below) and use an
enumerator to feed it a ByteString from a file, or do you have to write
functions explicitly to work with a given iteratee implementation?
import qualified Data.ByteString.Char8 as B
sortLines = B.unlines . sort . B.lines
On Fri, Jun 24, 2011 at 7:24 AM, Henk-Jan van Tuyl <hjgtuyl at chello.nl>wrote:
> On Fri, 24 Jun 2011 15:11:59 +0200, David Place <d at vidplace.com> wrote:
>> I've been trying to learn Iteratee IO. I've made some progress by
>> studying John Millikin's examples in the source of the enumerator package.
>> I was surprised how confusing I found the tutorials that are available. I
>> think that it is primarily because of the lack of concrete examples. It
>> would be great if we could accumulate a collection of small concrete
>> programs like John's wc.hs which show various uses of Data.Enumerator.
>> Here's a little program I wrote to find the longest run of same characters
>> in a file.
>> Does anyone else have little examples like this that use Iteratee IO?
> Try finding packages that depend on the enumerator/iteratee packages at
> (which is down at the moment).
> Henk-Jan van Tuyl
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe