mutable-iter-0.3: iteratees based upon mutable buffers

Data.MutableIter

Synopsis

Documentation

newtype MIteratee s m a Source

Constructors

MIteratee 

Fields

unwrap :: Iteratee s m a
 

Instances

data IOBuffer r el Source

A mutable buffer to hold storable elements. This data type supports memory recycling.

Instances

createIOBuffer :: Storable el => Int -> ForeignPtr Int -> ForeignPtr el -> IOBuffer r elSource

Create a buffer from a length and data array.

type MEnumerator s m a = MIteratee s m a -> m (MIteratee s m a)Source

type MEnumeratee sFrom sTo m a = MIteratee sTo m a -> MIteratee sFrom m (MIteratee sTo m a)Source

joinIob :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m (MIteratee (IOBuffer r el') m a) -> MIteratee (IOBuffer r el) m aSource

joinIM :: Monad m => m (MIteratee (IOBuffer r el) m a) -> MIteratee (IOBuffer r el) m aSource

liftI :: Monad m => (Stream s -> MIteratee s m a) -> MIteratee s m aSource

idone :: Monad m => a -> Stream s -> MIteratee s m aSource

guardNull :: (MonadCatchIO m, Storable el) => IOBuffer r el -> MIteratee (IOBuffer r el) m a -> MIteratee (IOBuffer r el) m a -> MIteratee (IOBuffer r el) m aSource

heads :: (MonadCatchIO m, Storable el, Eq el) => [el] -> MIteratee (IOBuffer r el) m IntSource

dropWhile :: (MonadCatchIO m, Storable el) => (el -> Bool) -> MIteratee (IOBuffer r el) m ()Source

foldl' :: (MonadCatchIO m, Storable el, Show a) => (a -> el -> a) -> a -> MIteratee (IOBuffer r el) m aSource

mapStream :: (MonadCatchIO pr, Storable elo, Storable eli) => Int -> (eli -> elo) -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) pr aSource

mapAccum :: (MonadCatchIO pr, Storable eli, Storable elo) => Int -> (b -> eli -> (b, elo)) -> b -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) pr aSource

convStream :: (MonadCatchIO pr, Storable elo, Storable eli) => MIteratee (IOBuffer r eli) pr (IOBuffer r elo) -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) pr aSource

takeUpTo :: (MonadCatchIO pr, Storable el) => Int -> MEnumeratee (IOBuffer r el) (IOBuffer r el) pr aSource

enumHandleRandomSource

Arguments

:: forall r el m a . (MonadCatchIO m, Storable el) 
=> Int

Buffer size (number of elements per read)

-> Handle 
-> MIteratee (IOBuffer r el) m a 
-> m (MIteratee (IOBuffer r el) m a) 

fileDriverRandom :: (MonadCatchIO m, Storable el) => Int -> (forall r. MIteratee (IOBuffer r el) m a) -> FilePath -> m aSource