0.4.9 has been uploaded to cabal, with the new operators. Changes are in the replied-to post (and also quoted below), plus the new operators proposed by Kazu Yamamoto.<br><br>Here's the corresponding docs (they have examples!)<br><br>------------------------------------------------------------------------------------------------------<br>-- | @enum =$ iter = 'joinI' (enum $$ iter)@<br>--<br>-- &amp;#x201c;Wraps&amp;#x201d; an iteratee /inner/ in an enumeratee /wrapper/.<br>-- The resulting iteratee will consume /wrapper/&amp;#x2019;s input type and<br>-- yield /inner/&amp;#x2019;s output type.<br>--<br>-- Note: if the inner iteratee yields leftover input when it finishes,<br>-- that extra will be discarded.<br>--<br>-- As an example, consider an iteratee that converts a stream of UTF8-encoded<br>-- bytes into a single 'TL.Text':<br>--<br>-- &gt; consumeUTF8 :: Monad m =&gt; Iteratee ByteString m Text<br>--<br>-- It could be written with either 'joinI' or '(=$)':<br>--<br>-- &gt; import Data.Enumerator.Text as ET<br>-- &gt;<br>-- &gt; consumeUTF8 = joinI (decode utf8 $$ ET.consume)<br>-- &gt; consumeUTF8 = decode utf8 =$ ET.consume<br>--<br>-- Since: 0.4.9<br><br>-- | @enum $= enee = 'joinE' enum enee@<br>--<br>-- &amp;#x201c;Wraps&amp;#x201d; an enumerator /inner/ in an enumeratee /wrapper/.<br>-- The resulting enumerator will generate /wrapper/&amp;#x2019;s output type.<br>--<br>-- As an example, consider an enumerator that yields line character counts<br>-- for a text file (e.g. for source code readability checking):<br>--<br>-- &gt; enumFileCounts :: FilePath -&gt; Enumerator Int IO b<br>--<br>-- It could be written with either 'joinE' or '($=)':<br>--<br>-- &gt; import Data.Text as T<br>-- &gt; import Data.Enumerator.List as EL<br>-- &gt; import Data.Enumerator.Text as ET<br>-- &gt;<br>-- &gt; enumFileCounts path = joinE (enumFile path) (EL.map T.length)<br>-- &gt; enumFileCounts path = enumFile path $= EL.map T.length<br>--<br>-- Since: 0.4.9<br>
------------------------------------------------------------------------------------------------------<br><br>Minor release note -- 0.4.9 and 0.4.9.1 are the exact same code; I just forgot a @ in one of the new docs and had to re-upload so Hackage would haddock properly. There is no difference in behavior.<br><br>On Monday, March 28, 2011 10:50:45 PM UTC-7, John Millikin wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Since the release, a couple people have sent in feature requests, so I'm going to put out 0.4.9 in a day or so.<br><br>New features will be:<br><br>- tryIO: runs an IO computation, and converts any exceptions into ``throwError`` calls (requested by Kazu Yamamoto)<br><br>- checkContinue: encapsulates a common pattern (loop (Continue k) = ...) when defining enumerators<br><br>- mapAccum and mapAccum: sort of like map and mapM, except the step function is stateful (requested by Long Huynh Huu)<br><br>Anyone else out there sitting on a request? Please send them in -- I am always happy to receive them, even if they must be declined.<br><br>---<br><br>Also, I would like to do a quick poll regarding operators.<br><br>1. It has been requested that I add operator aliases for joinI and joinE.<br><br>2. There have been complaints that the library defines too many operators (currently, 5).<br><br>Do any existing enumerator users, or anyone for that matter, have an opinion either way?<br><br>The proposed operators are:<br><br>------------------------------<wbr>------------------------------<wbr>----------<br>infixr 0 =$<br>

infixr 0 $=<br>
<br>
(=$) :: Monad m =&gt; Enumeratee ao ai m b -&gt; Iteratee ai m b -&gt; Iteratee ao m b<br>
enum =$ iter = joinI (enum $$ iter)<br>
<br>
($=) :: Monad m =&gt; Enumerator ao m (Step ai m b) -&gt; Enumeratee ao ai m b -&gt; Enumerator ai m b<br>
($=) = joinE<br>
------------------------------<wbr>------------------------------<wbr>----------<br><br></blockquote>