criterion 1.5.10.0 → 1.5.11.0
raw patch · 3 files changed
+27/−7 lines, 3 filesdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson
API changes (from Hackage documentation)
Files
- Criterion/Report.hs +17/−3
- changelog.md +4/−0
- criterion.cabal +6/−4
Criterion/Report.hs view
@@ -70,6 +70,10 @@ import qualified Language.Javascript.Chart as Chart #endif +#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.Key as Key+#endif+ -- | Trim long flat tails from a KDE plot. tidyTails :: KDE -> KDE tidyTails KDE{..} = KDE { kdeType = kdeType@@ -214,8 +218,9 @@ -> Value {-# SPECIALIZE vector :: T.Text -> U.Vector Double -> Value #-} vector name v = toJSON . map val . G.toList $ v where- val i = object [ name .= i ]+ val i = object [ toKey name .= i ] + -- | Render the elements of two vectors. vector2 :: (G.Vector v a, G.Vector v b, ToJSON a, ToJSON b) => T.Text -- ^ Name for elements from the first vector.@@ -227,9 +232,18 @@ -> Value #-} vector2 name1 name2 v1 v2 = toJSON $ zipWith val (G.toList v1) (G.toList v2) where val i j = object- [ name1 .= i- , name2 .= j+ [ toKey name1 .= i+ , toKey name2 .= j ]++#if MIN_VERSION_aeson(2,0,0)+toKey :: T.Text -> Key.Key+toKey = Key.fromText+#else+toKey :: T.Text -> T.Text+toKey = id+#endif+ -- | Attempt to include the contents of a file based on a search path. -- Returns 'B.empty' if the search fails or the file could not be read.
changelog.md view
@@ -1,3 +1,7 @@+1.5.11.0++* Allow building with `aeson-2.0.0.0`.+ 1.5.10.0 * Fix a bug in which the `defaultMainWith` function would not use the
criterion.cabal view
@@ -1,5 +1,5 @@ name: criterion-version: 1.5.10.0+version: 1.5.11.0 synopsis: Robust, reliable performance measurement and analysis license: BSD3 license-file: LICENSE@@ -80,10 +80,12 @@ Paths_criterion build-depends:- aeson >= 1,+ -- TODO: Eventually, we should bump the lower version bounds to >=2 so that+ -- we can remove some CPP in Criterion.Report. See #247.+ aeson >= 1 && < 2.1, ansi-wl-pprint >= 0.6.7.2, base >= 4.5 && < 5,- base-compat-batteries >= 0.10 && < 0.12,+ base-compat-batteries >= 0.10 && < 0.13, binary >= 0.5.1.0, binary-orphans >= 1.0.1 && < 1.1, bytestring >= 0.9 && < 1.0,@@ -195,7 +197,7 @@ tasty-hunit, tasty-quickcheck, vector,- aeson >= 0.8+ aeson test-suite cleanup type: exitcode-stdio-1.0