Hello community,

here is the log from the commit of package ghc-optparse-applicative for 
openSUSE:Factory checked in at 2018-10-25 08:17:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-optparse-applicative (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-optparse-applicative.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-optparse-applicative"

Thu Oct 25 08:17:44 2018 rev:10 rq:642884 version:0.14.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-optparse-applicative/ghc-optparse-applicative.changes
        2018-07-21 10:22:19.174999470 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-optparse-applicative.new/ghc-optparse-applicative.changes
   2018-10-25 08:18:03.196025823 +0200
@@ -1,0 +2,12 @@
+Thu Oct  4 09:42:59 UTC 2018 - [email protected]
+
+- Update optparse-applicative to version 0.14.3.0.
+  ## Version 0.14.3.0 (03 Oct 2018)
+
+  - Updated dependency bounds.
+
+  - Fix tab completion with Commands being unreachable.
+
+  - Clean ups and Documentation.
+
+-------------------------------------------------------------------

Old:
----
  optparse-applicative-0.14.2.0.tar.gz

New:
----
  optparse-applicative-0.14.3.0.tar.gz

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

Other differences:
------------------
++++++ ghc-optparse-applicative.spec ++++++
--- /var/tmp/diff_new_pack.yYAAfc/_old  2018-10-25 08:18:03.860025531 +0200
+++ /var/tmp/diff_new_pack.yYAAfc/_new  2018-10-25 08:18:03.864025529 +0200
@@ -12,14 +12,14 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %global pkg_name optparse-applicative
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.14.2.0
+Version:        0.14.3.0
 Release:        0
 Summary:        Utilities and combinators for parsing command line options
 License:        BSD-3-Clause

++++++ optparse-applicative-0.14.2.0.tar.gz -> 
optparse-applicative-0.14.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/optparse-applicative-0.14.2.0/CHANGELOG.md 
new/optparse-applicative-0.14.3.0/CHANGELOG.md
--- old/optparse-applicative-0.14.2.0/CHANGELOG.md      2018-02-26 
10:40:23.000000000 +0100
+++ new/optparse-applicative-0.14.3.0/CHANGELOG.md      2018-10-04 
03:20:14.000000000 +0200
@@ -1,3 +1,11 @@
+## Version 0.14.3.0 (03 Oct 2018)
+
+- Updated dependency bounds.
+
+- Fix tab completion with Commands being unreachable.
+
+- Clean ups and Documentation.
+
 ## Version 0.14.2.0 (26 Feb 2018)
 
 - Updated dependency bounds.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/optparse-applicative-0.14.2.0/Options/Applicative/Common.hs 
new/optparse-applicative-0.14.3.0/Options/Applicative/Common.hs
--- old/optparse-applicative-0.14.2.0/Options/Applicative/Common.hs     
2018-02-26 10:40:23.000000000 +0100
+++ new/optparse-applicative-0.14.3.0/Options/Applicative/Common.hs     
2018-10-04 03:20:14.000000000 +0200
@@ -274,7 +274,7 @@
       | otherwise
       = MultNode []
     go m d r f (MultP p1 p2) = MultNode [go m d r f p1, go m d r' f p2]
-      where r' = r || has_positional p1
+      where r' = r || hasArg p1
     go m d r f (AltP p1 p2) = AltNode [go m d' r f p1, go m d' r f p2]
       where d' = d || has_default p1 || has_default p2
     go _ d r f (BindP p k) =
@@ -283,18 +283,12 @@
         Nothing -> go'
         Just aa -> MultNode [ go', go True d r f (k aa) ]
 
-    has_positional :: Parser a -> Bool
-    has_positional (NilP _) = False
-    has_positional (OptP p) = (is_positional . optMain) p
-    has_positional (MultP p1 p2) = has_positional p1 || has_positional p2
-    has_positional (AltP p1 p2) = has_positional p1 || has_positional p2
-    has_positional (BindP p _) = has_positional p
-
-    is_positional :: OptReader a -> Bool
-    is_positional (OptReader {})  = False
-    is_positional (FlagReader {}) = False
-    is_positional (ArgReader {})  = True
-    is_positional (CmdReader {})  = True
+    hasArg :: Parser a -> Bool
+    hasArg (NilP _) = False
+    hasArg (OptP p) = (isArg . optMain) p
+    hasArg (MultP p1 p2) = hasArg p1 || hasArg p2
+    hasArg (AltP p1 p2) = hasArg p1 || hasArg p2
+    hasArg (BindP p _) = hasArg p
 
 
 simplify :: OptTree a -> OptTree a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/optparse-applicative-0.14.2.0/Options/Applicative/Internal.hs 
new/optparse-applicative-0.14.3.0/Options/Applicative/Internal.hs
--- old/optparse-applicative-0.14.2.0/Options/Applicative/Internal.hs   
2018-02-26 10:40:23.000000000 +0100
+++ new/optparse-applicative-0.14.3.0/Options/Applicative/Internal.hs   
2018-10-04 03:20:14.000000000 +0200
@@ -30,7 +30,7 @@
 import Control.Monad (MonadPlus(..), liftM, ap, guard)
 import Control.Monad.Trans.Class (MonadTrans, lift)
 import Control.Monad.Trans.Except
-  (runExcept, runExceptT, withExcept, ExceptT(..), throwE, catchE)
+  (runExcept, runExceptT, withExcept, ExceptT(..), throwE)
 import Control.Monad.Trans.Reader
   (mapReaderT, runReader, runReaderT, Reader, ReaderT, ask)
 import Control.Monad.Trans.State (StateT, get, put, modify, evalStateT, 
runStateT)
@@ -43,7 +43,6 @@
   getPrefs :: m ParserPrefs
 
   missingArgP :: ParseError -> Completer -> m a
-  tryP :: m a -> m (Either ParseError a)
   errorP :: ParseError -> m a
   exitP :: IsCmdStart -> ArgPolicy -> Parser b -> Maybe a -> m a
 
@@ -79,7 +78,6 @@
   getPrefs = P . lift . lift $ ask
 
   missingArgP e _ = errorP e
-  tryP (P p) = P $ lift $ runExceptT p
   exitP i _ p = P . maybe (throwE . MissingError i . SomeParser $ p) return
   errorP = P . throwE
 
@@ -152,7 +150,6 @@
   getPrefs = Completion $ lift ask
 
   missingArgP _ = Completion . lift . lift . ComplOption
-  tryP (Completion p) = Completion $ catchE (Right <$> p) (return . Left)
   exitP _ a p _ = Completion . lift . lift $ ComplParser (SomeParser p) a
   errorP = Completion . throwE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/optparse-applicative-0.14.2.0/README.md 
new/optparse-applicative-0.14.3.0/README.md
--- old/optparse-applicative-0.14.2.0/README.md 2018-02-26 10:40:23.000000000 
+0100
+++ new/optparse-applicative-0.14.3.0/README.md 2018-10-04 03:20:14.000000000 
+0200
@@ -238,7 +238,7 @@
     -q --target world
 
 It is this property which leads us to an Applicative interface
-instead of a Monadic one, as all option must be considered in
+instead of a Monadic one, as all options must be considered in
 parallel, and can not depend on the output of other options.
 
 Note, however, that the order of sequencing is still somewhat
@@ -475,8 +475,8 @@
 
 Another interesting use for the `flag'` builder is to count the
 number of instances on the command line, for example, verbosity
-settings could be specified on a scale; the following parser with
-count the number of of instances of `-v` on the command line.
+settings could be specified on a scale; the following parser will
+count the number of instances of `-v` on the command line.
 
 ```haskell
 length <$> many (flag' () (short 'v'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/optparse-applicative-0.14.2.0/optparse-applicative.cabal 
new/optparse-applicative-0.14.3.0/optparse-applicative.cabal
--- old/optparse-applicative-0.14.2.0/optparse-applicative.cabal        
2018-02-26 10:40:23.000000000 +0100
+++ new/optparse-applicative-0.14.3.0/optparse-applicative.cabal        
2018-10-04 03:20:14.000000000 +0200
@@ -1,5 +1,5 @@
 name:                optparse-applicative
-version:             0.14.2.0
+version:             0.14.3.0
 synopsis:            Utilities and combinators for parsing command line options
 description:
     optparse-applicative is a haskell library for parsing options
@@ -24,11 +24,6 @@
 cabal-version:       >= 1.8
 extra-source-files:  CHANGELOG.md
                      README.md
-                     tests/Examples/Alternatives.hs
-                     tests/Examples/Cabal.hs
-                     tests/Examples/Commands.hs
-                     tests/Examples/Hello.hs
-                     tests/Examples/Formatting.hs
                      tests/alt.err.txt
                      tests/cabal.err.txt
                      tests/carry.err.txt
@@ -57,23 +52,22 @@
   if impl(ghc >= 8.0)
     ghc-options:  -Wno-redundant-constraints -Wcompat 
-Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
 
-  exposed-modules:     Options.Applicative,
-                       Options.Applicative.Arrows,
-                       Options.Applicative.BashCompletion,
-                       Options.Applicative.Builder,
-                       Options.Applicative.Builder.Completer,
-                       Options.Applicative.Builder.Internal,
-                       Options.Applicative.Common,
-                       Options.Applicative.Extra,
-                       Options.Applicative.Help,
-                       Options.Applicative.Help.Chunk,
-                       Options.Applicative.Help.Core,
-                       Options.Applicative.Help.Levenshtein,
-                       Options.Applicative.Help.Pretty,
-                       Options.Applicative.Help.Types,
-                       Options.Applicative.Types,
-                       Options.Applicative.Internal
-
+  exposed-modules:     Options.Applicative
+                     , Options.Applicative.Arrows
+                     , Options.Applicative.BashCompletion
+                     , Options.Applicative.Builder
+                     , Options.Applicative.Builder.Completer
+                     , Options.Applicative.Builder.Internal
+                     , Options.Applicative.Common
+                     , Options.Applicative.Extra
+                     , Options.Applicative.Help
+                     , Options.Applicative.Help.Chunk
+                     , Options.Applicative.Help.Core
+                     , Options.Applicative.Help.Levenshtein
+                     , Options.Applicative.Help.Pretty
+                     , Options.Applicative.Help.Types
+                     , Options.Applicative.Types
+                     , Options.Applicative.Internal
 
   build-depends:       base                            == 4.*
                      , transformers                    >= 0.2 && < 0.6
@@ -95,10 +89,16 @@
   hs-source-dirs:
                        tests
 
+  other-modules:       Examples.Alternatives
+                     , Examples.Cabal
+                     , Examples.Commands
+                     , Examples.Formatting
+                     , Examples.Hello
+
   build-depends:       base
                      , bytestring                      == 0.10.*
                      , optparse-applicative
-                     , QuickCheck                      >= 2.8 && < 2.12
+                     , QuickCheck                      >= 2.8 && < 2.13
 
   if !impl(ghc >= 8)
     build-depends:     semigroups
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/optparse-applicative-0.14.2.0/tests/test.hs 
new/optparse-applicative-0.14.3.0/tests/test.hs
--- old/optparse-applicative-0.14.2.0/tests/test.hs     2018-02-26 
10:40:23.000000000 +0100
+++ new/optparse-applicative-0.14.3.0/tests/test.hs     2018-10-04 
03:20:14.000000000 +0200
@@ -649,16 +649,16 @@
 
 prop_suggest :: Property
 prop_suggest = once $
-  let p2 = subparser (command "reachable"   (info (pure ()) idm))
-      p1 = subparser (command "unreachable" (info (pure ()) idm))
-      p  = (,) <$> p2 <*> p1
+  let p2 = subparser (command "first"   (info (pure ()) idm))
+      p1 = subparser (command "fst"     (info (pure ()) idm))
+      p3 = subparser (command "far-off" (info (pure ()) idm))
+      p  = p2 *> p1 *> p3
       i  = info p idm
-      result = run i ["ureachable"]
+      result = run i ["fist"]
   in assertError result $ \failure ->
     let (msg, _)  = renderFailure failure "prog"
     in  counterexample msg
-       $  isInfixOf "Did you mean this?\n    reachable" msg
-      .&. not (isInfixOf "unreachable" msg)
+       $  isInfixOf "Did you mean one of these?\n    first\n    fst" msg
 
 prop_bytestring_reader :: Property
 prop_bytestring_reader = once $


Reply via email to