Question

I find Oleg's docs on Iteratee somewhat difficult to get into. Especially since some of the functions in his posts to Haskell-Cafe aren't in the iteratee library (like enum_file).

Is there a good introduction to iteratee somewhere, something that goes through basics like opening a file/socket, reading and processing the data.

Was it helpful?

Solution

As far as I know, there is no good introduction yet. I learned them by rewriting Oleg's code. So that would certainly be one path: implement a left-fold based IO layer.

OTHER TIPS

A good article on Iteratees was recently published in the Monad Reader:

http://themonadreader.wordpress.com/2010/05/12/issue-16

This article has plenty of examples, and alternate implementations that increase in complexity as it goes.

I have some slides on monoidal parsing that build Iteratee based Parsec streams up as an intermediate result that you might find useful.

http://comonad.com/reader/2009/iteratees-parsec-and-monoid/

For the enumerator package (which includes an iteratee) there is an example of how to USE the implementation, instead of showing how you could reimplement the package. It shows an alternative implementation of the unix find command, as explained in the Real World Haskell book (section 9).

http://www.mew.org/~kazu/proj/enumerator/

You could probably also us it as a starting point for using other implementations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top