"      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  GEnable map functions for containers that require class contexts on the 7 element types. For lists, this is identical to plain . LNullPoint class. Containers that have a null representation, corresponding  to Data.Monoid.mempty. Nullable container class  ,Class of streams which can be filled from a . Typically these , are streams which can be read from a file, Handle, or similar resource. #The pointer must not be used after  readFromPtr completes. 8The Int parameter is the length of the data in *bytes*.      GAlas, GHC provides no function to read from Fd to an allocated buffer. G The library function fdRead is not appropriate as it returns a string  already. I'!d rather get data from a buffer. C Furthermore, fdRead (at least in GHC) allocates a new buffer each E time it is called. This is a waste. Yet another problem with fdRead 9 is in raising an exception on any IOError or even EOF. I' d rather  avoid exceptions altogether. 4The following fseek procedure throws no exceptions. 0poll if file descriptors have something to read - Return the list of read-pending descriptors      An Iteratee exception specified by a String. The Iteratee needs more data but received EOF. A seek request within an Iteratee. Root of iteratee exceptions.  A class for iteratee exceptions. Only inheritants of  IterException $ should be instances of this class. The enumerator received an  it could not handle. &Create an enumerator exception from a String. The iteratee diverged upon receiving EOF.  !+Root of the Iteratee exception hierarchy.  IFException derives from  Control.Exception.SomeException.  , , ( and all inheritants are descendents of "!. "# Create an   from a string. $ Convert an  to an  . Meant to be used  within an  Enumerator) to signify that it could not handle the   IterException. % Create an iteratee exception from a string. ! This convenience function wraps  and .  !"#$%!" #%$ !""#$%&Monadic iteratee '())Describe the status of a stream of data. *+,-CA stream is a (continuing) sequence of elements bundled in Chunks. 8 The first variant indicates termination of the stream. ; Chunk a gives the currently available part of the stream. # The stream is not terminated yet. F The case (null Chunk) signifies a stream with no currently available @ data but which is still continuing. A stream processor should,  informally speaking, ``suspend itself'' and wait for more data  to arrive. ./0 Produce the /6 error message. If the stream was terminated because & of an error, keep the error message. 123456Send / to the Iteratee* and disregard the unconsumed part of the F stream. If the iteratee is in an exception state, that exception is  thrown with Control.Exception.throw#. Iteratees that do not terminate  on EOF will throw . 7HRun an iteratee, returning either the result or the iteratee exception. J Note that only internal iteratee exceptions will be returned; exceptions  thrown with Control.Exception.throw or Control.Monad.CatchIO.throw will  not be returned.  See "! for details. 8"Transform a computation inside an Iteratee. Map a function over a stream. 1 !"#$%&'()*+,-./012345678-/.),+*&'(678123450&'('(),+**+,-/../0123456789:Each enumerator takes an iteratee and returns an iteratee + an Enumerator is an iteratee transformer. = The enumerator normally stops when the stream is terminated F or when the iteratee moves to the done state, whichever comes first. 3 When to stop is of course up to the enumerator... :;-Report and propagate an unrecoverable error. F Disregard the input first and then propagate the error. This error  cannot be handled by Q, although it can be cleared  by =. <HReport and propagate a recoverable error. This error can be handled by  both Q and =. =(Check if an iteratee produces an error.  Returns Right a+ if it completes without errors, otherwise  Left SomeException. =& is useful for iteratees that may not  terminate, such as Data.Iteratee.head with an empty stream. >The identity iteratee. Doesn't do any processing of input. ?&Get the stream status of an iteratee. @Skip the rest of the stream A!Seek to a position in the stream BDMap a monadic function over the chunks of the stream and ignore the I result. Useful for creating efficient monadic iteratee consumers, e.g. )logger = mapChunksM_ (liftIO . putStrLn) Bthese can be efficiently run in parallel with other iteratees via  enumPair. CD>Convert one stream into another, not necessarily in lockstep. @ The transformer mapStream maps one element of the outer stream E to one element of the nested stream. The transformer below is more F general: it may take several elements of the outer stream to produce ; one element of the inner stream, or the other way around. A The transformation from one stream to the other is specified as  Iteratee s m s'. EIThe most general stream converter. Given a function to produce iteratee G transformers and an initial state, convert the stream using iteratees J generated by the function while continually updating the internal state. FGH6Applies the iteratee to the given stream. This wraps I,  J, and N%, calling the appropriate enumerator  based upon -. IFThe most primitive enumerator: applies the iteratee to the terminated G stream. The result is the iteratee in the Done state. It is an error , if the iteratee does not terminate on EOF. JFAnother primitive enumerator: tell the Iteratee the stream terminated  with an error. KKThe composition of two enumerators: essentially the functional composition H It is convenient to flip the order of the arguments of the composition , though: in e1 >>> e2, e1 is executed first LEnumeratee composition K Run the second enumeratee within the first. In this example, stream2list  is run within the 'take 10', which is itself run within 'take 15' , resulting  in 15 elements being consumed ) run =<< enumPure1Chunk [1..1000 :: Int] 5 (joinI $ (I.take 15 ><> I.take 10) I.stream2list)  [1,2,3,4,5,6,7,8,9,10] M7enumeratee composition with the arguments flipped, see L NThe pure 1-chunk enumerator A It passes a given list of elements to the iteratee in one chunk F This enumerator does no IO and is useful for testing of base parsing O$Checks if an iteratee has finished. D This enumerator runs the iteratee, performing any monadic actions. 7 If the result is True, the returned iteratee is done. P.Create an enumerator from a callback function QICreate an enumerator from a callback function with an exception handler. F The exception handler is called if an iteratee reports an exception. K !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ;<=>@?BDEFG9:HIJNOPQKCLMA9:;<=>?@ABCDEFGHIJKLMNOPQ $RCheck if a stream has received /. SCRead a stream to the end and return all of its elements as a list. < This iteratee returns all data from the stream *strictly*. TERead a stream to the end and return all of its elements as a stream. < This iteratee returns all data from the stream *strictly*. UFTakes an element predicate and returns the (possibly empty) prefix of I the stream. None of the characters in the string satisfy the character  predicate. N If the stream is not terminated, the first character of the remaining stream  satisfies the predicate. N.B. breakE! should be used in preference to break.  break< will retain all data until the predicate is met, which may  result in a space leak. The analogue of  List.break V=Attempt to read the next element of the stream and return it 9 Raise a (recoverable) error if the stream is terminated The analogue of  List.head W=Attempt to read the last element of the stream and return it 9 Raise a (recoverable) error if the stream is terminated The analogue of  List.last X>Given a sequence of characters, attempt to match them against = the characters on the stream. Return the count of how many B characters matched. The matched characters are removed from the  stream. % For example, if the stream contains abd, then (heads abc)  will remove the characters ab and return 2. Y?Look ahead at the next element of the stream, without removing  it from the stream.  Return Just c if successful, return Nothing if the stream is  terminated by EOF. ZReturn a chunk of t" elements length, while consuming d elements + from the stream. Useful for creating a rolling average with convStream. [7Drop n elements of the stream, if there are that many. The analogue of  List.drop \/Skip all elements while the predicate is true. The analogue of List.dropWhile ]=Return the total length of the remaining part of the stream. . This forces evaluation of the entire stream. The analogue of  List.length ^ATakes an element predicate and an iteratee, running the iteratee ; on all elements of the stream until the predicate is met. the following rule relates break to breakE  break pred === joinI (breakE pred stream2stream) breakE! should be used in preference to break whenever possible. _BRead n elements from a stream and apply the given iteratee to the H stream of the read elements. Unless the stream is terminated early, we C read exactly n elements, even if the iteratee has accepted fewer. The analogue of  List.take `BRead n elements from a stream and apply the given iteratee to the C stream of the read elements. If the given iteratee accepted fewer  elements, we stop.  This is the variation of _ with the early termination K of processing of the outer stream once the processing of the inner stream  finished early. MN.B. If the inner iteratee finishes early, remaining data within the current  chunk will be dropped. a-Map the stream: another iteratee transformer * Given the stream of elements of the type el and the function el->el', / build a nested stream of elements of the type el' and apply the  given iteratee to it. The analog of List.map bMap the stream rigidly. Like a&, but the element type cannot change.  This function is necessary for  ByteString and similar types  that cannot have ' instances, and may be more efficient. c Creates an  enumeratee) with only elements from the stream that K satisfy the predicate function. The outer stream is completely consumed. The analogue of  List.filter d Creates an  enumeratee' in which elements from the stream are  grouped into sz-.sized blocks. The outer stream is completely 2 consumed and the final block may be smaller than sz. efLeft-associative fold. The analogue of  List.foldl g9Left-associative fold that is strict in the accumulator. / This function should be used in preference to f whenever possible. The analogue of  List.foldl'. hCVariant of foldl with no base case. Requires at least one element  in the stream. The analogue of  List.foldl1. iStrict variant of h. jSum of a stream. kProduct of a stream. l=Enumerate two iteratees over a single stream simultaneously.  Deprecated, use m instead.  Compare to zip. m=Enumerate two iteratees over a single stream simultaneously.  Compare to zip. nopqGEnumerate over two iteratees in parallel as long as the first iteratee L is still consuming input. The second iteratee will be terminated with EOF H when the first iteratee has completed. An example use is to determine - how many elements an iteratee has consumed:  * snd <$> enumWith (dropWhile (<5)) length  Compare to zip rBEnumerate a list of iteratees over a single stream simultaneously C and discard the results. This is a different behavior than Prelude's A sequence_ which runs iteratees in the list one after the other.  Compare to  sequence_. sThe pure n-chunk enumerator 9 It passes a given stream of elements to the iteratee in n-sized chunks. tFMap a monadic function over the elements of the stream and ignore the  result. uThe analogue of Control.Monad.foldM o !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu$RSTU\[VWXYZ]^_`abcdefghijkslqmnoprtu$RSTUVWXYZ[\]^_`abcdefghijklmnopqrstu v4Print lines as they are received. This is the first impure iteratee 2 with non-trivial actions during chunk processing .Only lines ending with a newline are printed, + data terminated with EOF is not printed. w"Print lines as they are received. @All lines are printed, including a line with a terminating EOF. < If the final line is terminated by EOF without a newline,  no newline is printed. J this function should be used in preference to printLines when possible, + as it is more efficient with long lines. x=Convert the stream of characters to the stream of lines, and 3 apply the given iteratee to enumerate the latter. ? The stream of lines is normally terminated by the empty line. B When the stream of characters is terminated, the stream of lines  is also terminated. I This is the first proper iteratee-enumerator: it is the iteratee of the 9 character stream and the enumerator of the line stream. y=Convert the stream of characters to the stream of words, and 3 apply the given iteratee to enumerate the latter. % Words are delimited by white space. $ This is the analogue of List.words z{vwxyz{vwx{yzvwxyz{ |Indicate endian-ness. }/Least Significan Byte is first (little-endian) ~,Most Significant Byte is first (big-endian) GRead 3 bytes in an endian manner. If the first bit is set (negative), < set the entire first byte so the Int32 will be negative as  well. |}~|~}|~}}~ DThe enumerator of a POSIX File Descriptor. This version enumerates A over the entire contents of a file, in order, unless stopped by 9 the iteratee. In particular, seeking is not supported. :A variant of enumFd that catches exceptions raised by the Iteratee. :The enumerator of a POSIX File Descriptor: a variation of enumFd that $ supports RandomIO (seek requests). Process a file using the given Iteratee. !Buffer size (number of elements) 1A version of fileDriverFd that supports seeking.  DThe (monadic) enumerator of a file Handle. This version enumerates A over the entire contents of a file, in order, unless stopped by 9 the iteratee. In particular, seeking is not supported. 3 Data is read into a buffer of the specified size. *Buffer size (number of elements per read) AAn enumerator of a file handle that catches exceptions raised by  the Iteratee. *Buffer size (number of elements per read) ;The enumerator of a Handle: a variation of enumHandle that $ supports RandomIO (seek requests). 3 Data is read into a buffer of the specified size. *Buffer size (number of elements per read)  Buffer size  Buffer size  Buffer size Process a file using the given Iteratee. This function wraps   enumHandle as a convenience. !Buffer size (number of elements)  A version of fileDriverHandle that supports seeking. !Buffer size (number of elements) The default buffer size. >Process a file using the given Iteratee. This function wraps  enumFd as a convenience. IA version of fileDriver with a user-specified buffer size (in elements). >Process a file using the given Iteratee. This function wraps  enumFdRandom as a convenience. z !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu|}~3Use an IO function to choose what iteratee to run. 9 -- Typically this function handles user interaction and + -- returns with a simple iteratee such as V or A.  -- * -- The IO function takes a value of type a as input, and  -- should return 'Right a' to continue, or 'Left b' 7 -- to terminate. Upon termination, ioIter will return 'Done b'.  --  -- The second argument to  is used as the initial input = -- to the IO function, and on each successive iteration the A -- previously returned value is used as input. Put another way,  -- the value of type a" is used like a fold accumulator.  -- The value of type b( is typically some form of control code D -- that the application uses to signal the reason for termination.  !""##$$%%&'())**++,,--./01123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~      `iteratee-0.8.2.0Data.Iteratee.IO.PosixData.Iteratee.Base.LooseMapData.NullPoint Data.Nullable Data.Iteratee.Base.ReadableChunkData.Iteratee.ExceptionData.Iteratee.BaseData.Iteratee.IterateeData.Iteratee.ListLikeData.Iteratee.CharData.Iteratee.BinaryData.Iteratee.IO.FdData.Iteratee.IO.HandleData.Iteratee.IOData.Iteratee.IO.InteractData.Iteratee.IO.Base Data.IterateebaseSystem.Posix.Types FileOffsetForeign.C.ErrorErrnoLooseMaplMap NullPointemptyNullablenullC ReadableChunk readFromPtrmyfdReadmyfdSeekselect'read'pendingIterStringException EofException SeekException IterException IExceptiontoIterExceptionfromIterExceptionEnumUnhandledIterExceptionEnumStringExceptionDivergentException EnumException IFExceptionenStrExc wrapIterExc iterStrExcIterateerunIter StreamStatusEofError EofNoError DataRemainingStreamChunkEOFsetEOFidoneicontliftIidoneMicontMruntryRun mapIteratee Enumerator EnumerateethrowErrthrowRecoverableErrcheckErridentityisStreamFinished skipToEofseek mapChunksM_eneeCheckIfDone convStreamunfoldConvStreamjoinIjoinIM enumChunkenumEofenumErr>>>><><><enumPure1ChunkenumCheckIfDoneenumFromCallbackenumFromCallbackCatch isFinished stream2list stream2streambreakheadlastheadspeekrolldrop dropWhilelengthbreakEtaketakeUpTo mapStreamrigidMapStreamfiltergroupgroupByfoldlfoldl'foldl1foldl1'sumproductenumPairzipzip3zip4zip5enumWith sequence_enumPureNChunkmapM_foldM printLinesprintLinesUnterminated enumLines enumWords enumWordsBS enumLinesBSEndianLSBMSB endianRead2 endianRead3 endianRead3i endianRead4enumFd enumFdCatch enumFdRandom fileDriverFdfileDriverRandomFd enumHandleenumHandleCatchenumHandleRandomenumFileenumFileRandomfileDriverHandlefileDriverRandomHandledefaultBufSize fileDriverfileDriverVBuffileDriverRandomfileDriverRandomVBufioIterGHC.BasemapGHC.PtrPtrc_selectcLSeekcReadTIMEVALFDSETfd2fdsfds2mfdunFdifExceptionToExceptionifExceptionFromExceptionenumExceptionToExceptionenumExceptionFromExceptioniterExceptionToExceptioniterExceptionFromException GHC.Exception toException bindIteratee$fFunctorStreamNotAnException excDivergent terminatorsmakefdCallbackmakeHandleCallback enumFile'GHC.List