fast-builder 0.1.4.0 → 0.1.5.0
raw patch · 3 files changed
+10/−10 lines, 3 filesdep −template-haskelldep −unordered-containersdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependencies removed: template-haskell, unordered-containers
Dependency ranges changed: aeson
API changes (from Hackage documentation)
Files
- Data/ByteString/FastBuilder/Internal.hs +2/−3
- benchmarks/aeson/template.hs +5/−3
- fast-builder.cabal +3/−4
Data/ByteString/FastBuilder/Internal.hs view
@@ -221,12 +221,11 @@ deriving (Functor) instance Applicative BuildM where- pure = return+ pure x = BuildM $ \k -> k x+ {-# INLINE pure #-} (<*>) = ap instance Monad BuildM where- return x = BuildM $ \k -> k x- {-# INLINE return #-} BuildM b >>= f = BuildM $ \k -> b $ \r -> runBuildM (f r) k {-# INLINE (>>=) #-}
benchmarks/aeson/template.hs view
@@ -10,13 +10,15 @@ #endif import Data.Aeson+import qualified Data.Aeson.Key as Key+import qualified Data.Aeson.KeyMap as KM 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 import qualified Data.Text.Encoding as T import qualified Data.Vector as V+import GHC.Exts (inline) import LIB @@ -51,8 +53,8 @@ fromNumber = either doubleDec integerDec . Sci.floatingOrInteger fromObject :: Object -> Builder-fromObject obj = char8 '{' <> H.foldMapWithKey f obj <> char8 '}'+fromObject obj = char8 '{' <> inline KM.foldMapWithKey f obj <> char8 '}' where f k v =- fromString k <> char8 ':' <> fromValue v+ fromString (Key.toText k) <> char8 ':' <> fromValue v <> char8 ','
fast-builder.cabal view
@@ -1,5 +1,5 @@ name: fast-builder-version: 0.1.4.0+version: 0.1.5.0 synopsis: Fast ByteString Builder description: An efficient implementation of ByteString builder. It should be faster than the standard implementation in most cases.@@ -36,9 +36,8 @@ hs-source-dirs: benchmarks/aeson other-modules: Fast, Bstr include-dirs: benchmarks/aeson- build-depends: base, fast-builder, aeson, criterion, bytestring,- scientific, text, vector, deepseq, ghc-prim, template-haskell,- unordered-containers >= 0.2.11.0+ build-depends: base, fast-builder, aeson >= 2, criterion, bytestring,+ scientific, text, vector, deepseq, ghc-prim ghc-options: -fsimpl-tick-factor=120 ghc-options: -Wall -threaded -g -rtsopts default-language: Haskell2010