packages feed

binary 0.7.2.1 → 0.7.2.2

raw patch · 5 files changed

+20/−25 lines, 5 filesdep ~basedep ~criterionPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, criterion

API changes (from Hackage documentation)

Files

benchmarks/Builder.hs view
@@ -9,8 +9,7 @@ import Control.DeepSeq import Control.Exception (evaluate) import Control.Monad.Trans (liftIO)-import Criterion.Config-import Criterion.Main hiding (run)+import Criterion.Main import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as C import qualified Data.ByteString.Lazy as L@@ -20,8 +19,10 @@  import Data.Binary.Builder -#if __GLASGOW_HASKELL__ < 706+#if !MIN_VERSION_bytestring(0,10,0) instance NFData S.ByteString+instance NFData L.ByteString where+  rnf = rnf . L.toChunks #endif  main :: IO ()
benchmarks/Get.hs view
@@ -9,8 +9,7 @@ import Control.DeepSeq import Control.Exception (evaluate) import Control.Monad.Trans (liftIO)-import Criterion.Config-import Criterion.Main hiding (run)+import Criterion.Main import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as C8 import qualified Data.ByteString.Lazy as L
binary.cabal view
@@ -1,5 +1,5 @@ name:            binary-version:         0.7.2.1+version:         0.7.2.2 license:         BSD3 license-file:    LICENSE author:          Lennart Kolmodin <kolmodin@gmail.com>@@ -116,7 +116,7 @@     base >= 3.0 && < 5,     bytestring,     cereal,-    criterion,+    criterion == 1.*,     deepseq,     mtl   -- build dependencies from using binary source rather than depending on the library@@ -130,7 +130,7 @@   build-depends:     base >= 3.0 && < 5,     bytestring,-    criterion,+    criterion == 1.*,     deepseq,     mtl   -- build dependencies from using binary source rather than depending on the library
src/Data/Binary/Builder/Base.hs view
@@ -81,7 +81,7 @@ #endif  #if defined(__GLASGOW_HASKELL__) && !defined(__HADDOCK__)-import GHC.Base+import GHC.Base (ord,Int(..),uncheckedShiftRL#) import GHC.Word (Word32(..),Word16(..),Word64(..)) # if WORD_SIZE_IN_BITS < 64 import GHC.Word (uncheckedShiftRL64#)
tests/Action.hs view
@@ -42,24 +42,19 @@       Actions as -> [ Actions as' | as' <- shrink as ]       BytesRead -> []       Fail -> []-      GetByteString n -> [ GetByteString n' | n' <- shrink n, n >= 0 ]-      Isolate 0 as -> [ Isolate 0 as' | as' <- shrink as ]-      Isolate 1 as -> [ Isolate 0 as' | as' <- shrink as ]-      Isolate n0 as -> nub $-        let ns as' = filter (>=0) $ (n0 - 1) : [ 0 .. max_len as' + 1 ]-        in Actions as : [ Isolate n' as'-                        | as' <- [] : shrink as-                        , n' <- ns as' ]-      Label str a -> Actions a : [ Label str a' | a' <- [] : shrink a, a /= []]-      LookAhead a -> Actions a : [ LookAhead a' | a' <- [] : shrink a, a /= []]-      LookAheadM b a -> Actions a : [ LookAheadM b a' | a' <- [] : shrink a, a /= []]-      LookAheadE b a -> Actions a : [ LookAheadE b a' | a' <- [] : shrink a, a /= []]-      Try [Fail] b -> Actions b : [ Try [Fail] b' | b' <- [] : shrink b ]+      GetByteString n -> [ GetByteString n' | n' <- shrink n ]+      Isolate n as -> nub $ Actions as :+        [ Isolate n' as' | (n',as') <- shrink (n,as)+                         , n' >= 0+                         , n' <= max_len as' + 1 ]+      Label str a -> Actions a : [ Label str a' | a' <- shrink a ]+      LookAhead a -> Actions a : [ LookAhead a' | a' <- shrink a ]+      LookAheadM b a -> Actions a : [ LookAheadM b a' | a' <- shrink a ]+      LookAheadE b a -> Actions a : [ LookAheadE b a' | a' <- shrink a ]+      Try [Fail] b -> Actions b : [ Try [Fail] b' | b' <- shrink b ]       Try a b ->         [Actions a | not (willFail' a)]-        ++ [ Try a' b' | a' <- [] : shrink a, b' <- [] : shrink b ]-        ++ [ Try a' b | a' <- [] : shrink a ]-        ++ [ Try a b' | b' <- [] : shrink b ]+        ++ [ Try a' b' | (a',b') <- shrink (a,b) ]  willFail :: Int -> [Action] -> Bool willFail inp xxs =