packages feed

pipes-break 0.2.0.3 → 0.2.0.5

raw patch · 4 files changed

+6/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

pipes-break.cabal view
@@ -1,5 +1,5 @@ name:                pipes-break-version:             0.2.0.3+version:             0.2.0.5 synopsis:            Pipes to group by any delimiter (such as lines with carriage returns) description:   `pipes-break` contains utility functions for splitting bytestring or text with any delimiter you like.
src/Pipes/Break/ByteString.hs view
@@ -8,8 +8,6 @@   --   -- > unBreaksBy delim (breaksBy delim foo) ≡ foo   -- > unBreakBy delim (breakBy delim foo) ≡ foo-  ---  -- with the presumption that two 'Producer's are "equivalent" if they produce the same string when drained.   breakBy, unBreakBy, breaksBy, unBreaksBy,    -- * Group Producers Ending By A Delimiter@@ -26,6 +24,7 @@   -- In other words:   --   -- > unEndsBy delim (endsBy delim foo) ≠ foo+  -- > unEndBy delim (endBy delim foo) ≠ foo   endBy, unEndBy, endsBy, unEndsBy,    -- * Utilities
src/Pipes/Break/Internal.hs view
@@ -63,7 +63,7 @@  _breakBy :: (TextLike a, Monad m) => a -> Producer a m r -> Producer a m (Producer a m r) -- If the user supplied an empty delimiter, breakByP would infinitely loop.-_breakBy delim | tlNull delim = \p -> for p yield >>= return . return+_breakBy delim | tlNull delim = fmap return _breakBy delim = execStateT (breakByP delim)  @@ -107,7 +107,7 @@               -- Starting with one less than the length of delimiter, test the end of this chunk.               else hoist lift (chunkEndsWith str bs (max (tlLength bs - (tlLength str - 1)) 0)) >>= \case -                -- The end of this chunk does begin with the delimiter, get more chunks, keep going.+                -- The end of this chunk does not begin with the delimiter, get more chunks, keep going.                 Nothing -> yieldP bs >> go                  -- This chunk has a delimiter at index n, yield up to it, drop remainder of delimiter from rest of stream.@@ -116,7 +116,7 @@                   hoist lift (dropChars (tlLength str - (tlLength bs - n)))             -- non null suff means suff has delimiter.-           -- pref must be yielded if it is non null+           -- pref must be yielded            (pref, suff) -> do               yieldP pref               unDrawP (tlDrop (tlLength str) suff)
src/Pipes/Break/Text.hs view
@@ -8,7 +8,6 @@   --   -- > unBreaksBy delim (breaksBy delim foo) ≡ foo   -- > unBreakBy delim (breakBy delim foo) ≡ foo-  --   breakBy, unBreakBy, breaksBy, unBreaksBy,    -- * Group Producers Ending By A Delimiter@@ -25,6 +24,7 @@   -- In other words:   --   -- > unEndsBy delim (endsBy delim foo) ≠ foo+  -- > unEndBy delim (endBy delim foo) ≠ foo   endBy, unEndBy, endsBy, unEndsBy,    -- * Utilities