packages feed

fast-builder 0.1.0.0 → 0.1.0.1

raw patch · 4 files changed

+13/−16 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Data/ByteString/FastBuilder/Internal.hs view
@@ -3,7 +3,6 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE RankNTypes #-}-{-# LANGUAGE CPP #-}  -- | This is an internal module; its interface is unstable. module Data.ByteString.FastBuilder.Internal@@ -126,7 +125,7 @@   {-# INLINE mempty #-}   mappend = (<>)   {-# INLINE mappend #-}-  mconcat xs = foldr mappend mempty xs+  mconcat = foldr mappend mempty   {-# INLINE mconcat #-}  -- | 'fromString' = 'stringUtf8'@@ -381,7 +380,7 @@  -- | Run the given suspended builder using a new thread. toBufferWriter :: MVar Request -> MVar Response -> Ptr Word8 -> X.BufferWriter-toBufferWriter !reqV !respV thunk buf0 sz0 = E.mask_ $ do+toBufferWriter !reqV !respV thunk buf0 sz0 = E.mask_ $   writer Nothing buf0 sz0   where     writer !maybeBuilderTid !buf !sz = do@@ -492,7 +491,7 @@  -- | Turn a value of type @a@ into a 'Builder', using the given 'PI.BoundedPrim'. primBounded :: PI.BoundedPrim a -> a -> Builder-primBounded prim x = write $ writeBoundedPrim prim x+primBounded prim = write . writeBoundedPrim prim {-# INLINE primBounded #-}  -- | Turn a 'Write' into a 'Builder'.@@ -515,19 +514,19 @@  -- | Turn a value of type @a@ into a 'Builder', using the given 'PI.FixedPrim'. primFixed :: PI.FixedPrim a -> a -> Builder-primFixed prim = \x -> primBounded (PI.toB prim) x+primFixed prim = primBounded (PI.toB prim) {-# INLINE primFixed #-}  -- | Turn a list of values of type @a@ into a 'Builder', using the given -- 'PI.BoundedPrim'. primMapListBounded :: PI.BoundedPrim a -> [a] -> Builder-primMapListBounded prim = \xs -> mconcat $ map (primBounded prim) xs+primMapListBounded prim = mconcat . map (primBounded prim) {-# INLINE primMapListBounded #-}  -- | Turn a list of values of type @a@ into a 'Builder', using the given -- 'PI.FixedPrim'. primMapListFixed :: PI.FixedPrim a -> [a] -> Builder-primMapListFixed prim = \xs -> primMapListBounded (PI.toB prim) xs+primMapListFixed prim = primMapListBounded (PI.toB prim) {-# INLINE primMapListFixed #-}  -- | Turn a 'S.ByteString' to a 'Builder'.@@ -772,9 +771,9 @@ -- | Throw a 'ChunkOverflowException' and switches to a 'ThreadedSink'. chunkOverflow :: IORef DynamicSink -> Int -> S.ByteString -> BuildM () chunkOverflow !dRef !minSize !chunk = do-  myTid <- io $ myThreadId-  reqV <- io $ newEmptyMVar-  respV <- io $ newEmptyMVar+  myTid <- io myThreadId+  reqV <- io newEmptyMVar+  respV <- io newEmptyMVar   io $ E.throwTo myTid $ ChunkOverflowException chunk reqV respV minSize   io $ writeIORef dRef $ ThreadedSink reqV respV   handleRequest reqV
benchmarks/aeson/HashMapExts.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE QuasiQuotes #-}-{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} module HashMapExts where
benchmarks/map.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DeriveFunctor #-} import Control.Concurrent import Criterion.Main import qualified Data.IntMap as IM
fast-builder.cabal view
@@ -1,5 +1,5 @@ name:                fast-builder-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Fast ByteString Builder description:         An efficient implementation of ByteString builder. It should be faster than                      the standard implementation in most cases.@@ -16,7 +16,7 @@ extra-source-files:  benchmarks/aeson/*.hs                      benchmarks/aeson/*.json cabal-version:       >=1.10-tested-with:         GHC >= 7.10.1 && < 8.1+tested-with:         GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1  library   exposed-modules:     Data.ByteString.FastBuilder,@@ -25,10 +25,10 @@   other-modules:       Data.ByteString.FastBuilder.Internal.Prim    -- other-extensions:-  build-depends:       base >= 4.8 && < 4.13, bytestring >= 0.10.6.0, ghc-prim+  build-depends:       base >= 4.8 && < 4.14, bytestring >= 0.10.6.0, ghc-prim   -- hs-source-dirs:   default-language:    Haskell2010-  ghc-options:         -Wall -g+  ghc-options:         -Wall  benchmark aeson   type:                exitcode-stdio-1.0