- newtype MIteratee s m a = MIteratee {}
- data IOBuffer r el
- createIOBuffer :: Storable el => Int -> ForeignPtr Int -> ForeignPtr el -> IOBuffer r el
- type MEnumerator s m a = MIteratee s m a -> m (MIteratee s m a)
- type MEnumeratee sFrom sTo m a = MIteratee sTo m a -> MIteratee sFrom m (MIteratee sTo m a)
- joinIob :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m (MIteratee s m a) -> MIteratee (IOBuffer r el) m a
- joinIM :: Monad m => m (MIteratee (IOBuffer r el) m a) -> MIteratee (IOBuffer r el) m a
- wrapEnum :: Monad m => Enumerator s m a -> MEnumerator s m a
- liftI :: Monad m => (Stream s -> MIteratee s m a) -> MIteratee s m a
- idone :: Monad m => a -> Stream s -> MIteratee s m a
- icont :: (Stream s -> MIteratee s m a) -> Maybe SomeException -> MIteratee s m a
- 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 a
- isStreamFinished :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m (Maybe SomeException)
- head :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m el
- heads :: (MonadCatchIO m, Storable el, Eq el) => [el] -> MIteratee (IOBuffer r el) m Int
- chunk :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m (IOBuffer r el)
- peek :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m (Maybe el)
- drop :: (MonadCatchIO m, Storable el) => Int -> MIteratee (IOBuffer r el) m ()
- dropWhile :: (MonadCatchIO m, Storable el) => (el -> Bool) -> MIteratee (IOBuffer r el) m ()
- foldl' :: (MonadCatchIO m, Storable el, Show a) => (a -> el -> a) -> a -> MIteratee (IOBuffer r el) m a
- hopfoldl' :: (MonadCatchIO m, Storable el, Show a) => Int -> (a -> el -> a) -> a -> MIteratee (IOBuffer r el) m a
- mapStream :: (MonadCatchIO pr, Storable elo, Storable eli) => Int -> (eli -> elo) -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) pr a
- mapChunk :: (Storable el, MonadCatchIO m) => (IOBuffer r el -> m s2) -> MEnumeratee (IOBuffer r el) s2 m a
- mapAccum :: (MonadCatchIO pr, Storable eli, Storable elo) => Int -> (b -> eli -> (b, elo)) -> b -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) pr a
- convStream :: (MonadCatchIO pr, Storable elo, Storable eli) => MIteratee (IOBuffer r eli) pr (IOBuffer r elo) -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) pr a
- unfoldConvStream :: (MonadCatchIO m, Storable eli, Storable elo) => (acc -> MIteratee (IOBuffer r eli) m (acc, IOBuffer r elo)) -> acc -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) m a
- getChannel :: (MonadCatchIO m, Storable el) => Int -> Int -> MEnumeratee (IOBuffer r el) (IOBuffer r el) m a
- takeUpTo :: (MonadCatchIO pr, Storable el) => Int -> MEnumeratee (IOBuffer r el) (IOBuffer r el) pr a
- fromUVector :: (Unbox el, Storable el, MonadCatchIO m) => Iteratee (Vector el) m a -> MIteratee (IOBuffer r el) m a
- enumHandleRandom :: forall r el m a. (MonadCatchIO m, Storable el) => Int -> 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 a
- newFp :: Storable a => a -> IO (ForeignPtr a)
Documentation
newtype MIteratee s m a Source
Storable el => MonadTrans (MIteratee (IOBuffer s el)) | |
(MonadIO m, Storable el) => Monad (MIteratee (IOBuffer r el) m) | |
(Monad m, Functor m) => Functor (MIteratee s m) | |
(MonadCatchIO m, Storable el) => MonadCatchIO (MIteratee (IOBuffer r el) m) | |
(MonadIO m, Storable el) => MonadIO (MIteratee (IOBuffer r el) m) |
A mutable buffer to hold storable elements. This data type supports memory recycling.
Storable el => MonadTrans (MIteratee (IOBuffer s el)) | |
(MonadIO m, Storable el) => Monad (MIteratee (IOBuffer r el) m) | |
(MonadCatchIO m, Storable el) => MonadCatchIO (MIteratee (IOBuffer r el) m) | |
Storable el => NullPoint (IOBuffer r el) | |
(MonadIO m, Storable el) => MonadIO (MIteratee (IOBuffer r el) m) |
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 s m a) -> MIteratee (IOBuffer r el) m aSource
wrapEnum :: Monad m => Enumerator s m a -> MEnumerator 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
isStreamFinished :: (MonadCatchIO m, Storable el) => MIteratee (IOBuffer r el) m (Maybe SomeException)Source
foldl' :: (MonadCatchIO m, Storable el, Show a) => (a -> el -> a) -> a -> MIteratee (IOBuffer r el) m aSource
hopfoldl' :: (MonadCatchIO m, Storable el, Show a) => Int -> (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
mapChunk :: (Storable el, MonadCatchIO m) => (IOBuffer r el -> m s2) -> MEnumeratee (IOBuffer r el) s2 m 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
unfoldConvStream :: (MonadCatchIO m, Storable eli, Storable elo) => (acc -> MIteratee (IOBuffer r eli) m (acc, IOBuffer r elo)) -> acc -> MEnumeratee (IOBuffer r eli) (IOBuffer r elo) m aSource
The most general stream converter. Given a function to produce iteratee transformers and an initial state, convert the stream using iteratees generated by the function while continually updating the internal state.
getChannel :: (MonadCatchIO m, Storable el) => Int -> Int -> MEnumeratee (IOBuffer r el) (IOBuffer r el) m aSource
Decimate a stream by taking every n'th element, starting at element m.
takeUpTo :: (MonadCatchIO pr, Storable el) => Int -> MEnumeratee (IOBuffer r el) (IOBuffer r el) pr aSource
fromUVector :: (Unbox el, Storable el, MonadCatchIO m) => Iteratee (Vector el) m a -> MIteratee (IOBuffer r el) m aSource
Convert a Vector iteratee to an MIteratee. Slower but convenient.
fileDriverRandom :: (MonadCatchIO m, Storable el) => Int -> (forall r. MIteratee (IOBuffer r el) m a) -> FilePath -> m aSource
newFp :: Storable a => a -> IO (ForeignPtr a)Source