Hello community, here is the log from the commit of package ghc-optparse-generic for openSUSE:Factory checked in at 2017-03-03 17:51:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-optparse-generic (Old) and /work/SRC/openSUSE:Factory/.ghc-optparse-generic.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-optparse-generic" Fri Mar 3 17:51:21 2017 rev:2 rq:461668 version:1.1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-optparse-generic/ghc-optparse-generic.changes 2016-10-22 13:14:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-optparse-generic.new/ghc-optparse-generic.changes 2017-03-03 17:51:22.403167600 +0100 @@ -1,0 +2,5 @@ +Sun Feb 12 14:09:52 UTC 2017 - psimons@suse.com + +- Update to version 1.1.4 with cabal2obs. + +------------------------------------------------------------------- Old: ---- optparse-generic-1.1.1.tar.gz New: ---- optparse-generic-1.1.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-optparse-generic.spec ++++++ --- /var/tmp/diff_new_pack.4kjIap/_old 2017-03-03 17:51:23.163060276 +0100 +++ /var/tmp/diff_new_pack.4kjIap/_new 2017-03-03 17:51:23.167059711 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-optparse-generic # -# 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,25 +18,24 @@ %global pkg_name optparse-generic Name: ghc-%{pkg_name} -Version: 1.1.1 +Version: 1.1.4 Release: 0 Summary: Auto-generate a command-line parser for your datatype License: BSD-3-Clause -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-bytestring-devel BuildRequires: ghc-optparse-applicative-devel BuildRequires: ghc-rpm-macros +BuildRequires: ghc-semigroups-devel BuildRequires: ghc-system-filepath-devel BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel BuildRequires: ghc-transformers-devel BuildRequires: ghc-void-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build -# End cabal-rpm deps %description This library auto-generates an 'optparse-applicative'-compatible 'Parser' from @@ -60,15 +59,12 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %post devel %ghc_pkg_recache ++++++ optparse-generic-1.1.1.tar.gz -> optparse-generic-1.1.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/optparse-generic-1.1.1/optparse-generic.cabal new/optparse-generic-1.1.4/optparse-generic.cabal --- old/optparse-generic-1.1.1/optparse-generic.cabal 2016-05-28 08:13:20.000000000 +0200 +++ new/optparse-generic-1.1.4/optparse-generic.cabal 2016-12-20 07:26:29.000000000 +0100 @@ -1,5 +1,5 @@ Name: optparse-generic -Version: 1.1.1 +Version: 1.1.4 Cabal-Version: >=1.8.0.2 Build-Type: Simple License: BSD3 @@ -27,10 +27,12 @@ system-filepath >= 0.3.1 && < 0.5 , text < 1.3 , transformers >= 0.2.0.0 && < 0.6 , - optparse-applicative >= 0.11.0 && < 0.13, + optparse-applicative >= 0.11.0 && < 0.14, time >= 1.5 && < 1.7 , void < 0.8 , - bytestring < 0.11 + bytestring < 0.11, + semigroups >= 0.5.0 && < 0.19 + if impl(ghc < 7.8) Build-Depends: singletons >= 0.10.0 && < 1.0 , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/optparse-generic-1.1.1/src/Options/Generic.hs new/optparse-generic-1.1.4/src/Options/Generic.hs --- old/optparse-generic-1.1.1/src/Options/Generic.hs 2016-05-28 07:36:51.000000000 +0200 +++ new/optparse-generic-1.1.4/src/Options/Generic.hs 2016-12-20 07:26:29.000000000 +0100 @@ -235,6 +235,7 @@ import Control.Monad.IO.Class (MonadIO(..)) import Data.Char (toLower, toUpper) import Data.Monoid +import Data.List.NonEmpty (NonEmpty((:|))) import Data.Proxy import Data.Text (Text) import Data.Typeable (Typeable) @@ -476,6 +477,9 @@ instance ParseField a => ParseFields [a] where parseFields = parseListOfField +instance ParseField a => ParseFields (NonEmpty a) where + parseFields h m = (:|) <$> parseField h m <*> parseListOfField h m + {-| Use this to annotate a field with a type-level string (i.e. a `Symbol`) representing the help description for that field: @@ -589,6 +593,9 @@ instance ParseField a => ParseRecord [a] where parseRecord = fmap getOnly parseRecord +instance ParseField a => ParseRecord (NonEmpty a) where + parseRecord = fmap getOnly parseRecord + instance (ParseFields a, ParseFields b) => ParseRecord (a, b) instance (ParseFields a, ParseFields b, ParseFields c) => ParseRecord (a, b, c) instance (ParseFields a, ParseFields b, ParseFields c, ParseFields d) => ParseRecord (a, b, c, d) @@ -776,8 +783,12 @@ => Text -- ^ Program description -> io a -getRecord desc = liftIO (Options.execParser info) +getRecord desc = liftIO (Options.customExecParser prefs info) where + prefs = Options.defaultPrefs + { Options.prefMultiSuffix = "..." + } + header = Options.header (Data.Text.unpack desc) info = Options.info parseRecord header @@ -799,11 +810,15 @@ -> Maybe a getRecordPure args = do let prefs = Options.ParserPrefs - { prefMultiSuffix = "" + { prefMultiSuffix = "..." , prefDisambiguate = False , prefShowHelpOnError = False , prefBacktrack = True , prefColumns = 80 +#if MIN_VERSION_optparse_applicative(0,13,0) + , prefShowHelpOnEmpty = False +#else +#endif } let header = Options.header "" let info = Options.info parseRecord header