iteratee-0.3.5: Iteratee-based I/OContentsIndex
Data.Iteratee.Base.StreamChunk
Contents
Types
Description
Monadic and General Iteratees: incremental input parsers, processors and transformers
Synopsis
class ListLike (c el) el => StreamChunk c el where
length :: c el -> Int
null :: c el -> Bool
cons :: el -> c el -> c el
head :: c el -> el
tail :: c el -> c el
findIndex :: (el -> Bool) -> c el -> Maybe Int
splitAt :: Int -> c el -> (c el, c el)
dropWhile :: (el -> Bool) -> c el -> c el
fromList :: [el] -> c el
toList :: c el -> [el]
cMap :: StreamChunk c el' => (el -> el') -> c el -> c el'
class (StreamChunk s el, Storable el) => ReadableChunk s el where
readFromPtr :: Ptr el -> Int -> IO (s el)
Types
class ListLike (c el) el => StreamChunk c el where
Class of types that can be used to hold chunks of data within Iteratee streams.
Methods
length :: c el -> Int
Length of currently available data.
null :: c el -> Bool
Test if the current stream is null.
cons :: el -> c el -> c el
Prepend an element to the front of the data.
head :: c el -> el
Return the first element of the stream.
tail :: c el -> c el
Return the tail of the stream.
findIndex :: (el -> Bool) -> c el -> Maybe Int
First index matching the predicate.
splitAt :: Int -> c el -> (c el, c el)
Split the data at the specified index.
dropWhile :: (el -> Bool) -> c el -> c el
Drop data matching the predicate.
fromList :: [el] -> c el
Create a stream from a list.
toList :: c el -> [el]
Create a list from the stream.
cMap :: StreamChunk c el' => (el -> el') -> c el -> c el'
Map a computation over the stream.
show/hide Instances
class (StreamChunk s el, Storable el) => ReadableChunk s el where
Class of streams which can be filled from a Ptr. Typically these are streams which can be read from a file. The Int parameter is the length of the data in bytes. N.B. The pointer must not be returned or used after readFromPtr completes.
Methods
readFromPtr :: Ptr el -> Int -> IO (s el)
show/hide Instances
Produced by Haddock version 2.7.2