Hello community,

here is the log from the commit of package ghc-tasty for openSUSE:Factory 
checked in at 2017-02-11 01:42:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-tasty (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-tasty.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-tasty"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-tasty/ghc-tasty.changes      2016-10-22 
13:20:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-tasty.new/ghc-tasty.changes 2017-02-11 
01:42:15.815862896 +0100
@@ -1,0 +2,5 @@
+Thu Jan 26 16:22:16 UTC 2017 - [email protected]
+
+- Update to version 0.11.1 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  tasty-0.11.0.4.tar.gz

New:
----
  tasty-0.11.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-tasty.spec ++++++
--- /var/tmp/diff_new_pack.1zzogp/_old  2017-02-11 01:42:17.227663686 +0100
+++ /var/tmp/diff_new_pack.1zzogp/_new  2017-02-11 01:42:17.231663121 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-tasty
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %global pkg_name tasty
 Name:           ghc-%{pkg_name}
-Version:        0.11.0.4
+Version:        0.11.1
 Release:        0
 Summary:        Modern and extensible testing framework
 License:        MIT

++++++ tasty-0.11.0.4.tar.gz -> tasty-0.11.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.0.4/CHANGELOG.md 
new/tasty-0.11.1/CHANGELOG.md
--- old/tasty-0.11.0.4/CHANGELOG.md     2016-08-23 15:39:28.000000000 +0200
+++ new/tasty-0.11.1/CHANGELOG.md       2017-01-18 12:51:23.000000000 +0100
@@ -1,6 +1,11 @@
 Changes
 =======
 
+Version 0.11.1
+--------------
+
+Introduce `mkOptionCLParser` and `mkFlagCLParser`
+
 Version 0.11.0.4
 ----------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tasty-0.11.0.4/Test/Tasty/Ingredients/ConsoleReporter.hs 
new/tasty-0.11.1/Test/Tasty/Ingredients/ConsoleReporter.hs
--- old/tasty-0.11.0.4/Test/Tasty/Ingredients/ConsoleReporter.hs        
2015-09-08 12:51:39.000000000 +0200
+++ new/tasty-0.11.1/Test/Tasty/Ingredients/ConsoleReporter.hs  2017-01-18 
12:40:24.000000000 +0100
@@ -334,7 +334,7 @@
   parseValue = fmap Quiet . safeRead
   optionName = return "quiet"
   optionHelp = return "Do not produce any output; indicate success only by the 
exit code"
-  optionCLParser = flagCLParser (Just 'q') (Quiet True)
+  optionCLParser = mkFlagCLParser (short 'q') (Quiet True)
 
 -- | Report only failed tests
 newtype HideSuccesses = HideSuccesses Bool
@@ -344,7 +344,7 @@
   parseValue = fmap HideSuccesses . safeRead
   optionName = return "hide-successes"
   optionHelp = return "Do not print tests that passed successfully"
-  optionCLParser = flagCLParser Nothing (HideSuccesses True)
+  optionCLParser = mkFlagCLParser mempty (HideSuccesses True)
 
 -- | When to use color on the output
 data UseColor
@@ -357,15 +357,6 @@
   parseValue = parseUseColor
   optionName = return "color"
   optionHelp = return "When to use colored output. Options are 'never', 
'always' and 'auto' (default: 'auto')"
-  optionCLParser =
-    option parse
-      (  long name
-      <> help (untag (optionHelp :: Tagged UseColor String))
-      )
-    where
-      name = untag (optionName :: Tagged UseColor String)
-      parse = str >>=
-        maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue
 
 -- | @useColor when isTerm@ decides if colors should be used,
 --   where @isTerm@ denotes where @stdout@ is a terminal device.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.0.4/Test/Tasty/Ingredients/ListTests.hs 
new/tasty-0.11.1/Test/Tasty/Ingredients/ListTests.hs
--- old/tasty-0.11.0.4/Test/Tasty/Ingredients/ListTests.hs      2015-01-19 
16:27:56.000000000 +0100
+++ new/tasty-0.11.1/Test/Tasty/Ingredients/ListTests.hs        2017-01-18 
12:40:24.000000000 +0100
@@ -8,6 +8,8 @@
 
 import Data.Typeable
 import Data.Proxy
+import Data.Monoid
+import Options.Applicative
 
 import Test.Tasty.Core
 import Test.Tasty.Options
@@ -22,7 +24,7 @@
   parseValue = fmap ListTests . safeRead
   optionName = return "list-tests"
   optionHelp = return "Do not run the tests; just print their names"
-  optionCLParser = flagCLParser (Just 'l') (ListTests True)
+  optionCLParser = mkFlagCLParser (short 'l') (ListTests True)
 
 -- | Obtain the list of all tests in the suite
 testsNames :: OptionSet -> TestTree -> [TestName]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.0.4/Test/Tasty/Options/Core.hs 
new/tasty-0.11.1/Test/Tasty/Options/Core.hs
--- old/tasty-0.11.0.4/Test/Tasty/Options/Core.hs       2016-08-23 
15:35:57.000000000 +0200
+++ new/tasty-0.11.1/Test/Tasty/Options/Core.hs 2017-01-18 12:40:24.000000000 
+0100
@@ -35,16 +35,7 @@
   parseValue = mfilter onlyPositive . fmap NumThreads . safeRead
   optionName = return "num-threads"
   optionHelp = return "Number of threads to use for tests execution"
-  optionCLParser =
-    option parse
-      (  short 'j'
-      <> long name
-      <> help (untag (optionHelp :: Tagged NumThreads String))
-      )
-    where
-      name = untag (optionName :: Tagged NumThreads String)
-      parse = str >>=
-        maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue
+  optionCLParser = mkOptionCLParser (short 'j')
 
 -- | Filtering function to prevent non-positive number of threads
 onlyPositive :: NumThreads -> Bool
@@ -67,16 +58,7 @@
       <*> pure str
   optionName = return "timeout"
   optionHelp = return "Timeout for individual tests (suffixes: ms,s,m,h; 
default: s)"
-  optionCLParser =
-    option parse
-      (  short 't'
-      <> long name
-      <> help (untag (optionHelp :: Tagged Timeout String))
-      )
-    where
-      name = untag (optionName :: Tagged Timeout String)
-      parse = str >>=
-        maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue
+  optionCLParser = mkOptionCLParser (short 't')
 
 parseTimeout :: String -> Maybe Integer
 parseTimeout str =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.0.4/Test/Tasty/Options.hs 
new/tasty-0.11.1/Test/Tasty/Options.hs
--- old/tasty-0.11.0.4/Test/Tasty/Options.hs    2015-01-19 16:27:56.000000000 
+0100
+++ new/tasty-0.11.1/Test/Tasty/Options.hs      2017-01-18 12:40:24.000000000 
+0100
@@ -17,6 +17,8 @@
   , OptionDescription(..)
     -- * Utilities
   , flagCLParser
+  , mkFlagCLParser
+  , mkOptionCLParser
   , safeRead
   ) where
 
@@ -46,7 +48,9 @@
   -- | A command-line option parser.
   --
   -- It has a default implementation in terms of the other methods.
-  -- You may want to override it in some cases (e.g. add a short flag).
+  -- You may want to override it in some cases (e.g. add a short flag) and
+  -- 'flagCLParser', 'mkFlagCLParser' and 'mkOptionCLParser' might come in
+  -- handy.
   --
   -- Even if you override this, you still should implement all the methods
   -- above, to allow alternative interfaces.
@@ -62,16 +66,7 @@
   -- failing parser into an always-succeeding one that may return an empty
   -- OptionSet.)
   optionCLParser :: Parser v
-  optionCLParser =
-    option parse
-      (  long name
-      <> help helpString
-      )
-    where
-      name = untag (optionName :: Tagged v String)
-      helpString = untag (optionHelp :: Tagged v String)
-      parse = str >>=
-        maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue
+  optionCLParser = mkOptionCLParser mempty
 
 
 data OptionValue = forall v . IsOption v => OptionValue v
@@ -119,12 +114,33 @@
   => Maybe Char -- ^ optional short flag
   -> v          -- ^ non-default value (when the flag is supplied)
   -> Parser v
-flagCLParser mbShort v = flag' v
-  (  foldMap short mbShort
-  <> long (untag (optionName :: Tagged v String))
+flagCLParser mbShort = mkFlagCLParser (foldMap short mbShort)
+
+-- | Command-line flag parser that takes additional option modifiers.
+mkFlagCLParser
+  :: forall v . IsOption v
+  => Mod FlagFields v -- ^ option modifier
+  -> v                -- ^ non-default value (when the flag is supplied)
+  -> Parser v
+mkFlagCLParser mod v = flag' v
+  (  long (untag (optionName :: Tagged v String))
   <> help (untag (optionHelp :: Tagged v String))
+  <> mod
   )
 
+-- | Command-line option parser that takes additional option modifiers.
+mkOptionCLParser :: forall v . IsOption v => Mod OptionFields v -> Parser v
+mkOptionCLParser mod =
+  option parse
+    (  long name
+    <> help (untag (optionHelp :: Tagged v String))
+    <> mod
+    )
+  where
+    name = untag (optionName :: Tagged v String)
+    parse = str >>=
+      maybe (readerError $ "Could not parse " ++ name) pure <$> parseValue
+
 -- | Safe read function. Defined here for convenience to use for
 -- 'parseValue'.
 safeRead :: Read a => String -> Maybe a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.0.4/Test/Tasty/Patterns.hs 
new/tasty-0.11.1/Test/Tasty/Patterns.hs
--- old/tasty-0.11.0.4/Test/Tasty/Patterns.hs   2016-08-23 15:30:33.000000000 
+0200
+++ new/tasty-0.11.1/Test/Tasty/Patterns.hs     2017-01-18 12:40:24.000000000 
+0100
@@ -89,12 +89,7 @@
   parseValue = Just . parseTestPattern
   optionName = return "pattern"
   optionHelp = return "Select only tests that match pattern"
-  optionCLParser =
-    option (fmap parseTestPattern str)
-      (  short 'p'
-      <> long (untag (optionName :: Tagged TestPattern String))
-      <> help (untag (optionHelp :: Tagged TestPattern String))
-      )
+  optionCLParser = mkOptionCLParser (short 'p')
 
 -- | Parse a pattern
 parseTestPattern :: String -> TestPattern
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasty-0.11.0.4/tasty.cabal 
new/tasty-0.11.1/tasty.cabal
--- old/tasty-0.11.0.4/tasty.cabal      2016-08-23 15:38:28.000000000 +0200
+++ new/tasty-0.11.1/tasty.cabal        2017-01-18 12:52:07.000000000 +0100
@@ -2,7 +2,7 @@
 --  see http://haskell.org/cabal/users-guide/
 
 name:                tasty
-version:             0.11.0.4
+version:             0.11.1
 synopsis:            Modern and extensible testing framework
 description:         Tasty is a modern testing framework for Haskell.
                      It lets you combine your unit tests, golden


Reply via email to