packages feed

streaming-bytestring 0.1.0.4 → 0.1.0.5

raw patch · 3 files changed

+6/−6 lines, 3 files

Files

Data/ByteString/Streaming.hs view
@@ -443,7 +443,7 @@ -- -- -- | /O(n\/c)/ Append a byte to the end of a 'ByteString' snoc :: Monad m => ByteString m r -> Word8 -> ByteString m r-snoc cs w = do +snoc cs w = do    -- cs <* singleton w   r <- cs   singleton w   return r@@ -480,7 +480,7 @@ {-# INLINABLE uncons #-} -- -- | /O(1)/ Extract the head and tail of a ByteString, or its return value--- if it is empty+-- if it is empty. This is the \'natural\' uncons for an effectful byte stream. nextByte :: Monad m => ByteString m r -> m (Either r (Word8, ByteString m r)) nextByte (Empty r) = return (Left r) nextByte (Chunk c cs)@@ -509,7 +509,6 @@   Go m       -> m >>= nextChunk {-# INLINABLE nextChunk #-} - -- | /O(n\/c)/ Extract the last element of a ByteString, which must be finite -- and non-empty. last :: Monad m => ByteString m r -> m Word8@@ -523,7 +522,7 @@    go _ (Chunk c cs) = go c cs    go x (Go m)       = m >>= go x {-# INLINABLE last #-}- + last' :: Monad m => ByteString m r -> m (Of (Maybe Word8) r) last' (Empty r)      = return (Nothing :> r) last' (Go m)         = m >>= last'
Data/ByteString/Streaming/Internal.hs view
@@ -153,7 +153,7 @@ chunk bs = consChunk bs (Empty ()) {-# INLINE chunk #-} ---+ -- | Smart constructor for 'Go'. wrap :: m (ByteString m r) -> ByteString m r wrap = Go
streaming-bytestring.cabal view
@@ -1,6 +1,7 @@ name:                streaming-bytestring-version:             0.1.0.4+version:             0.1.0.5 synopsis:            effectful byte steams, or: lazy bytestring done right+ description:         This is an implementation of effectful, memory-constrained                       bytestrings (byte streams) and functions for streaming                       bytestring manipulation, adequate for non-lazy-io.