packages feed

criterion 1.6.1.0 → 1.6.2.0

raw patch · 4 files changed

+18/−62 lines, 4 filesdep +prettyprinterdep +prettyprinter-ansi-terminaldep ~aesondep ~optparse-applicativePVP ok

version bump matches the API change (PVP)

Dependencies added: prettyprinter, prettyprinter-ansi-terminal

Dependency ranges changed: aeson, optparse-applicative

API changes (from Hackage documentation)

Files

Criterion/Main/Options.hs view
@@ -25,7 +25,6 @@  import Control.Monad (when) import Criterion.Analysis (validateAccessors)-import Criterion.Main.Options.Internal (tabulate, text) import Criterion.Types (Config(..), Verbosity(..), measureAccessors,                         measureKeys) import Data.Char (isSpace, toLower)@@ -35,12 +34,14 @@ import Data.Version (showVersion) import GHC.Generics (Generic) import Options.Applicative-import Options.Applicative.Help (Chunk(..))-import Options.Applicative.Help.Pretty ((.$.), Doc)+import Options.Applicative.Help (Chunk(..), tabulate)+import Options.Applicative.Help.Pretty ((.$.)) import Options.Applicative.Types import Paths_criterion (version) import Prelude () import Prelude.Compat+import Prettyprinter (Doc, pretty)+import Prettyprinter.Render.Terminal (AnsiStyle) import Statistics.Types (mkCL,cl95) import qualified Data.Map as M @@ -239,8 +240,10 @@ versionInfo = "built with criterion " <> showVersion version  -- We sort not by name, but by likely frequency of use.-regressionHelp :: Chunk Doc+regressionHelp :: Chunk (Doc AnsiStyle) regressionHelp =-    fmap (text "Regression metrics (for use with --regress):" .$.) $-      tabulate [(text n,text d) | (n,(_,d)) <- map f measureKeys]+    fmap (pretty "Regression metrics (for use with --regress):" .$.) $+      tabulate+        (prefTabulateFill defaultPrefs)+        [(pretty n, pretty d) | (n,(_,d)) <- map f measureKeys]   where f k = (k, measureAccessors M.! k)
− Criterion/Main/Options/Internal.hs
@@ -1,52 +0,0 @@-{-# LANGUAGE CPP #-}---- |--- Module      : Criterion.Main.Options.Internal--- Copyright   : (c) 2022 Ryan Scott------ License     : BSD-style--- Maintainer  : bos@serpentine.com--- Stability   : experimental--- Portability : GHC------ Provides a shim on top of @optparse-applicative@ to define two functions:------ * Define a 'tabulate' function that is backwards-compatible with---   pre-@0.17.*@ versions of @optparse-applicative@.--- * Define a 'text' function that is forward-compatible with---   @optparse-applicative-0.18.*@ or later.------ These are deliberately kept separate from the rest of--- "Criterion.Main.Options" because these functions require CPP to define, and--- there is a Haddock comment in "Criterion.Main.Options" that will cause the--- CPP preprocessor to trigger an \"unterminated comment\" error. Ugh.------ TODO: When we support @optparse-applicative-0.18@ as the minimum, remove--- this module, and simply inline the definitions of 'tabulate' and 'text' in--- "Criterion.Main.Options".-module Criterion.Main.Options.Internal (tabulate, text) where--import qualified Options.Applicative.Help as Options-import Options.Applicative.Help (Chunk, Doc)--#if MIN_VERSION_optparse_applicative(0,17,0)-import Options.Applicative (ParserPrefs(..), defaultPrefs)-#endif---- | A shim on top of 'Options.tabulate' from @optparse-applicative@ that is--- backwards-compatible with pre-@0.17.*@ versions of @optparse-applicative@.-tabulate :: [(Doc, Doc)] -> Chunk Doc-#if MIN_VERSION_optparse_applicative(0,17,0)-tabulate = Options.tabulate (prefTabulateFill defaultPrefs)-#else-tabulate = Options.tabulate-#endif---- | A shim on top of 'Options.pretty' from @optparse-applicative@ that is--- forward-compatible with @optparse-applicative-0.18.*@ or later.-text :: String -> Doc-#if MIN_VERSION_optparse_applicative(0,18,0)-text = Options.pretty-#else-text = Options.text-#endif
changelog.md view
@@ -1,3 +1,8 @@+1.6.2.0++* Require `optparse-applicative-0.18.*` as the minimum and add an explicit+  dependency on `prettyprinter` and `prettyprinter-ansi-terminal`.+ 1.6.1.0  * Support building with `optparse-applicative-0.18.*`.
criterion.cabal view
@@ -1,5 +1,5 @@ name:           criterion-version:        1.6.1.0+version:        1.6.2.0 synopsis:       Robust, reliable performance measurement and analysis license:        BSD3 license-file:   LICENSE@@ -77,7 +77,6 @@     Criterion.Types    other-modules:-    Criterion.Main.Options.Internal     Criterion.Monad.Internal    other-modules:@@ -105,9 +104,10 @@     js-chart >= 2.9.4 && < 3,     mtl >= 2,     mwc-random >= 0.8.0.3,-    -- TODO: Depend on optparse-applicative-0.18 as the minimum (see #258)-    optparse-applicative >= 0.13 && < 0.19,+    optparse-applicative >= 0.18 && < 0.19,     parsec >= 3.1.0,+    prettyprinter >= 1.7 && < 1.8,+    prettyprinter-ansi-terminal >= 1.1 && < 1.2,     statistics >= 0.14 && < 0.17,     text >= 0.11,     time,