packages feed

fast-builder 0.1.2.0 → 0.1.2.1

raw patch · 3 files changed

+8/−43 lines, 3 filesdep −true-namedep ~basedep ~unordered-containersPVP ok

version bump matches the API change (PVP)

Dependencies removed: true-name

Dependency ranges changed: base, unordered-containers

API changes (from Hackage documentation)

Files

− benchmarks/aeson/HashMapExts.hs
@@ -1,35 +0,0 @@-{-# LANGUAGE QuasiQuotes #-}-{-# LANGUAGE MagicHash #-}-{-# LANGUAGE UnboxedTuples #-}-module HashMapExts where--import Data.HashMap.Strict (HashMap)-import Data.Monoid-import GHC.Exts (SmallArray#, sizeofSmallArray#, indexSmallArray#, Int(..))-import Unsafe.TrueName (truename)--foldMapWithKey :: (Monoid m) => (k -> a -> m) -> HashMap k a -> m-foldMapWithKey f = go-  where-    go hm = case hm of-      [truename| ''HashMap Empty |] -> mempty-      [truename| ''HashMap BitmapIndexed | _ ary |] -> foldMapArray go ary-      [truename| ''HashMap Full | ary |] -> foldMapArray go ary-      [truename| ''HashMap Collision | _ ary |] -> foldMapArray leaf ary-      [truename| ''HashMap Leaf | _ l |] -> leaf l--    leaf [truename| ''HashMap Leaf Leaf L | k v|]  = f k v-{-# INLINE foldMapWithKey #-}--foldMapArray :: (Monoid m) =>-    (a -> m) -> [truename| ''HashMap Full Array |] a -> m-foldMapArray f [truename| ''HashMap Full Array Array | a |] = foldMapArray' f a--foldMapArray' :: (Monoid m) => (a -> m) -> SmallArray# a -> m-foldMapArray' f arr = go 0-  where-    go k@(I# k#)-      | k >= I# (sizeofSmallArray# arr) = mempty-      | otherwise = case indexSmallArray# arr k# of-        (# v #) -> f v <> go (k + 1)-{-# INLINE foldMapArray' #-}
benchmarks/aeson/template.hs view
@@ -11,6 +11,7 @@  import Data.Aeson import qualified Data.ByteString.Lazy as L+import qualified Data.HashMap.Strict as H import Data.Monoid import qualified Data.Scientific as Sci import qualified Data.Text as T@@ -18,7 +19,6 @@ import qualified Data.Vector as V  import LIB-import HashMapExts  valueToLazyByteString :: Value -> L.ByteString valueToLazyByteString = toLazyByteString . fromValue@@ -51,7 +51,7 @@ fromNumber = either doubleDec integerDec . Sci.floatingOrInteger  fromObject :: Object -> Builder-fromObject obj = char8 '{' <> foldMapWithKey f obj <> char8 '}'+fromObject obj = char8 '{' <> H.foldMapWithKey f obj <> char8 '}'   where       f k v =         fromString k <> char8 ':' <> fromValue v
fast-builder.cabal view
@@ -1,5 +1,5 @@ name:                fast-builder-version:             0.1.2.0+version:             0.1.2.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 == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1+tested-with:         GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.3 || ==8.10.1  library   exposed-modules:     Data.ByteString.FastBuilder,@@ -25,7 +25,7 @@   other-modules:       Data.ByteString.FastBuilder.Internal.Prim    -- other-extensions:-  build-depends:       base >= 4.8 && < 4.14, bytestring >= 0.10.6.0, ghc-prim+  build-depends:       base >= 4.8 && < 4.15, bytestring >= 0.10.6.0, ghc-prim   -- hs-source-dirs:   default-language:    Haskell2010   ghc-options:         -Wall@@ -34,11 +34,11 @@   type:                exitcode-stdio-1.0   main-is:             main.hs   hs-source-dirs:      benchmarks/aeson-  other-modules:       Fast, Bstr, HashMapExts+  other-modules:       Fast, Bstr   include-dirs:        benchmarks/aeson   build-depends:       base, fast-builder, aeson, criterion, bytestring,-    scientific, text, vector, deepseq, unordered-containers, ghc-prim,-    template-haskell, true-name >= 0.1.0.0+    scientific, text, vector, deepseq, ghc-prim, template-haskell,+    unordered-containers >= 0.2.11.0   ghc-options:         -fsimpl-tick-factor=120   ghc-options:         -Wall -threaded -g -rtsopts   default-language:    Haskell2010