Apologies for the empty post.
You might turn your attention to the following web page, which approaches the problem using recursive co-routines. Amidst a discussion of UNIX pipes, both in history and as a primitive co-routine implementation, there is a two-line Haskell program.
http://www.cs.dartmouth.edu/~doug/sieve/