packages feed

binary-list 0.2.0.2 → 0.2.0.3

raw patch · 2 files changed

+8/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/BinaryList/Serialize.hs view
@@ -127,8 +127,11 @@               -- If the final length index has been reached, we stop decoding.               then FinalResult xs input               -- Otherwise, we read another chunk of data of the same size of-              -- the already decoded data.-              else case runGetOrFail (replicateM (2^i) f) input of+              -- the already decoded data, prepending the accumulated data as+              -- a partial result.+              else PartialResult xs $ case runGetOrFail (replicateM (2^i) f) input of+                     -- In case of error, we return the accumulated result+                     -- followed by a decoding error.                      Left (r,_,err) -> DecodingError err r                      Right (r,_,list) ->                        let -- Binary list of new data@@ -139,9 +142,8 @@                            zs = if d == FromLeft                                    then ListNode (i+1) xs ys                                    else ListNode (i+1) ys xs-                           -- The Partial result is returned, and used again recurively to-                           -- build the next binary list.-                       in  PartialResult zs $ go r zs+                           -- The new list is fed to the next recursion step.+                       in  go r zs  -- | Translate an encoded binary list to a bytestring. encodedToByteString :: EncodedBinList -> ByteString
binary-list.cabal view
@@ -1,5 +1,5 @@ name:                binary-list-version:             0.2.0.2+version:             0.2.0.3 synopsis:            Lists of size length a power of two. description:         Some algorithmic problems work only when the input list                      has length a power of two. This library provides with a