That would be a great idea... too bad it&#39;s an April hoax ;)<br><br><br><div class="gmail_quote">Le 1 avril 2012 21:50, John Millikin <span dir="ltr">&lt;<a href="mailto:jmillikin@gmail.com">jmillikin@gmail.com</a>&gt;</span> a écrit :<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are currently several APIs for processing strict monoidal values<br>
as if they were pieces of a larger, lazy value. Some of the most<br>
popular are based on Oleg&#39;s left-fold enumerators, including the<br>
&quot;iteratee&quot;, &quot;enumerator&quot;, &quot;iterIO&quot;. Other choices include &quot;comonads&quot;,<br>
&quot;conduits&quot;, and &quot;pipes&quot;.<br>
<br>
Despite having various internal implementations and semantics, these<br>
libraries generally export a similar-looking API. This is a terrible<br>
duplication of effort, and it causes dependant packages to be strongly<br>
tied to the underlying implementation.<br>
<br>
I propose that a new package, &quot;tzinorot&quot;, be written to provide a<br>
single API based on Data.List. It should be pretty easy to use,<br>
requiring only a few common extensions to the type system.<br>
<br>
For example, the enumerator package&#39;s &#39;mapM&#39; function could be<br>
generalized for use in tzinorot through a few simple modifications to<br>
the type signature:<br>
<br>
----------<br>
-- enumerator mapM<br>
mapM :: Monad m =&gt; (ao -&gt; m ai) -&gt; Enumeratee ao ai m b<br>
<br>
-- tzinorot mapM<br>
mapM :: (Monad m, Tzinorot t, ListLike l1 a1, ListLike l2 a2) =&gt; (l1<br>
a1 -&gt; m (l2 a2)) -&gt; t Void s (TzinorotItems (l1 a1)) (TzinorotItems<br>
(l2 a2)) m r<br>
----------<br>
<br>
To make it easier to install and use the tzinorot package, it will<br>
depend on all of its supported implementations (iteratee, enumerator,<br>
conduits, pipes, etc), and use Michael Snoyman&#39;s &quot;cabala&quot; tool to<br>
manage dependency versions. See the cabala announcement for details on<br>
use:<br>
<br>
<a href="http://www.yesodweb.com/blog/2012/04/replacing-cabal" target="_blank">http://www.yesodweb.com/blog/2012/04/replacing-cabal</a><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>