From: Permjacov Evgeniy &lt;<a href="mailto:permeakra@gmail.com">permeakra@gmail.com</a>&gt;<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Hi. I Wrote a simple iteration library. It was not intensively tested,<br>
so it MAY contatin bugs, but it is very unlikely. The library is<br>
currently on github: <a href="https://github.com/permeakra/iteration" target="_blank">https://github.com/permeakra/iteration</a><br>
<br>
I&#39;m not ready to upload it to hackage, as some testing and extension is<br>
really needed. However, I&#39;d like to know about possible flaws.<br>
<br>
Current goal is addition of byte-stream (de)compression and IO functions<br>
extenstion. After this package will be cabalized and uploaded to<br>
hackage. So, while design is not frozen yet, I&#39;m interested in criticism -)/<br></blockquote><div><br>First, I haven&#39;t examined your code in sufficient depth to fully understand it, so I may be off the mark with this comment.  However, I&#39;m not convinced it&#39;s possible to safely implement zipping in iteration-style IO without another technique (e.g. monadic regions), by which I mean I suspect any code which exposes enough control to pause an enumeration (or alternatively allows a user-supplied termination check to the enumerator) will also not provide guaranteed finalization/garbage collection of the underlying resource (e.g. handle).<br>
<br>I also require zipping of streams, and in fact it is possible with iteratee.  I haven&#39;t included the code in the library because I was formerly not convinced of its safety.  I do think it&#39;s safe now, but only by use of a monadic region.<br>
<br>John<br></div></div>