packages feed

criterion 1.0.1.0 → 1.0.2.0

raw patch · 3 files changed

+29/−22 lines, 3 filesdep ~basedep ~optparse-applicativePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, optparse-applicative

API changes (from Hackage documentation)

Files

Criterion/Main/Options.hs view
@@ -134,26 +134,29 @@ outputOption file m =   optional (strOption (m <> metavar "FILE" <> maybe mempty value file)) -range :: (Show a, Read a, Ord a) => a -> a -> String -> ReadM a-range lo hi s =-    case reads s of-      [(i, "")]-        | i >= lo && i <= hi -> return i-        | otherwise -> readerError $ show i ++ " is outside range " ++-                                     show (lo,hi)-      _             -> readerError $ show s ++ " is not a number"+range :: (Show a, Read a, Ord a) => a -> a -> ReadM a+range lo hi = do+  s <- readerAsk+  case reads s of+    [(i, "")]+      | i >= lo && i <= hi -> return i+      | otherwise -> readerError $ show i ++ " is outside range " +++                                   show (lo,hi)+    _             -> readerError $ show s ++ " is not a number" -match :: String -> ReadM MatchType-match m-    | mm `isPrefixOf` "pfx"    = return Prefix-    | mm `isPrefixOf` "prefix" = return Prefix-    | mm `isPrefixOf` "glob"   = return Glob-    | otherwise                = readerError $-                                 show m ++ " is not a known match type"-    where mm = map toLower m+match :: ReadM MatchType+match = do+  m <- readerAsk+  case map toLower m of+    mm | mm `isPrefixOf` "pfx"    -> return Prefix+       | mm `isPrefixOf` "prefix" -> return Prefix+       | mm `isPrefixOf` "glob"   -> return Glob+       | otherwise                -> readerError $+                                     show m ++ " is not a known match type" -regressParams :: String -> ReadM ([String], String)-regressParams m = do+regressParams :: ReadM ([String], String)+regressParams = do+  m <- readerAsk   let repl ','   = ' '       repl c     = c       tidy       = reverse . dropWhile isSpace . reverse . dropWhile isSpace@@ -163,8 +166,7 @@   when (null ps) $     readerError "no predictors specified"   let ret = (words . map repl . drop 1 $ ps, tidy r)-  either readerError (ReadM . Right . const ()) $ uncurry validateAccessors ret-  return ret+  either readerError (const (return ret)) $ uncurry validateAccessors ret  -- | Flesh out a command line parser. describe :: Config -> ParserInfo Mode
changelog.md view
@@ -1,3 +1,8 @@+1.0.2.0++* Bump lower bound on optparse-applicative to 0.11 to handle yet more+  annoying API churn.+ 1.0.1.0  * Added a lower bound of 0.10 on the optparse-applicative dependency,
criterion.cabal view
@@ -1,5 +1,5 @@ name:           criterion-version:        1.0.1.0+version:        1.0.2.0 synopsis:       Robust, reliable performance measurement and analysis license:        BSD3 license-file:   LICENSE@@ -87,7 +87,7 @@     hastache >= 0.6.0,     mtl >= 2,     mwc-random >= 0.8.0.3,-    optparse-applicative >= 0.10,+    optparse-applicative >= 0.11,     parsec >= 3.1.0,     statistics >= 0.13.2.1,     text >= 0.11,