Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-optparse-generic for 
openSUSE:Factory checked in at 2021-11-17 01:13:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-optparse-generic (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-optparse-generic.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-optparse-generic"

Wed Nov 17 01:13:22 2021 rev:6 rq:931671 version:1.4.7

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-optparse-generic/ghc-optparse-generic.changes    
    2021-09-13 16:25:22.254802960 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-optparse-generic.new.1890/ghc-optparse-generic.changes
      2021-11-17 01:14:00.238166466 +0100
@@ -1,0 +2,16 @@
+Tue Nov  9 08:00:41 UTC 2021 - [email protected]
+
+- Update optparse-generic to version 1.4.7.
+  1.4.7
+
+  * [Derive `Data` instances for exported 
types](https://github.com/Gabriel439/Haskell-Optparse-Generic-Library/pull/89)
+
+-------------------------------------------------------------------
+Sun Oct 10 14:50:34 UTC 2021 - [email protected]
+
+- Update optparse-generic to version 1.4.6.
+  1.4.6
+
+  * Use `readField` in default implementation of `parseField`
+
+-------------------------------------------------------------------

Old:
----
  optparse-generic-1.4.5.tar.gz

New:
----
  optparse-generic-1.4.7.tar.gz

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

Other differences:
------------------
++++++ ghc-optparse-generic.spec ++++++
--- /var/tmp/diff_new_pack.EkXVG9/_old  2021-11-17 01:14:00.958166737 +0100
+++ /var/tmp/diff_new_pack.EkXVG9/_new  2021-11-17 01:14:00.962166738 +0100
@@ -18,7 +18,7 @@
 
 %global pkg_name optparse-generic
 Name:           ghc-%{pkg_name}
-Version:        1.4.5
+Version:        1.4.7
 Release:        0
 Summary:        Auto-generate a command-line parser for your datatype
 License:        BSD-3-Clause
@@ -32,6 +32,7 @@
 BuildRequires:  ghc-system-filepath-devel
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-time-devel
+BuildRequires:  ghc-transformers-compat-devel
 BuildRequires:  ghc-transformers-devel
 BuildRequires:  ghc-void-devel
 ExcludeArch:    %{ix86}

++++++ optparse-generic-1.4.5.tar.gz -> optparse-generic-1.4.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/optparse-generic-1.4.5/CHANGELOG.md 
new/optparse-generic-1.4.7/CHANGELOG.md
--- old/optparse-generic-1.4.5/CHANGELOG.md     2001-09-09 03:46:40.000000000 
+0200
+++ new/optparse-generic-1.4.7/CHANGELOG.md     2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,11 @@
+1.4.7
+
+* [Derive `Data` instances for exported 
types](https://github.com/Gabriel439/Haskell-Optparse-Generic-Library/pull/89)
+
+1.4.6
+
+* Use `readField` in default implementation of `parseField`
+
 1.4.5
 
 * [Add ability to set the short name in the 
type](https://github.com/Gabriel439/Haskell-Optparse-Generic-Library/pull/84)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/optparse-generic-1.4.5/optparse-generic.cabal 
new/optparse-generic-1.4.7/optparse-generic.cabal
--- old/optparse-generic-1.4.5/optparse-generic.cabal   2001-09-09 
03:46:40.000000000 +0200
+++ new/optparse-generic-1.4.7/optparse-generic.cabal   2001-09-09 
03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 Name: optparse-generic
-Version: 1.4.5
+Version: 1.4.7
 Cabal-Version: >=1.10
 Build-Type: Simple
 License: BSD3
@@ -24,10 +24,11 @@
 Library
     Hs-Source-Dirs: src
     Build-Depends:
-        base                 >= 4.6      && < 5   ,
+        base                 >= 4.7      && < 5   ,
         system-filepath      >= 0.3.1    && < 0.5 ,
         text                                < 1.3 ,
         transformers         >= 0.2.0.0  && < 0.7 ,
+        transformers-compat  >= 0.3      && < 0.8 ,
         Only                                < 0.2 ,
         optparse-applicative >= 0.16.0.0 && < 0.17,
         time                 >= 1.5      && < 1.13,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/optparse-generic-1.4.5/src/Options/Generic.hs 
new/optparse-generic-1.4.7/src/Options/Generic.hs
--- old/optparse-generic-1.4.5/src/Options/Generic.hs   2001-09-09 
03:46:40.000000000 +0200
+++ new/optparse-generic-1.4.7/src/Options/Generic.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -2,6 +2,7 @@
 {-# LANGUAGE CPP                        #-}
 {-# LANGUAGE DataKinds                  #-}
 {-# LANGUAGE DefaultSignatures          #-}
+{-# LANGUAGE DeriveDataTypeable         #-}
 {-# LANGUAGE DeriveGeneric              #-}
 {-# LANGUAGE EmptyDataDecls             #-}
 {-# LANGUAGE FlexibleInstances          #-}
@@ -329,7 +330,10 @@
 
 import Control.Applicative
 import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Trans.Except (runExcept)
+import Control.Monad.Trans.Reader (runReaderT)
 import Data.Char (isUpper, toLower, toUpper)
+import Data.Data (Data)
 import Data.Int (Int8, Int16, Int32, Int64)
 import Data.Maybe (listToMaybe)
 import Data.Monoid
@@ -397,8 +401,7 @@
         -- ^ Default value
         -> Parser a
     default parseField
-        :: Read a
-        => Maybe Text
+        :: Maybe Text
         -- ^ Help message
         -> Maybe Text
         -- ^ Field label
@@ -419,7 +422,7 @@
                        <> Options.long (Data.Text.unpack name)
                        <> foldMap (Options.help . Data.Text.unpack) h
                        <> foldMap Options.short c
-                       <> foldMap Options.value (d >>= Text.Read.readMaybe)
+                       <> foldMap Options.value (d >>= runReadM readField)
                        <> foldMap (Options.showDefaultWith . const) d
                 Options.option   readField fs
 
@@ -447,6 +450,11 @@
     default metavar :: Typeable a => proxy a -> String
     metavar _ = map toUpper (show (Data.Typeable.typeOf (undefined :: a)))
 
+-- | a readMaybe using provided ReadM
+runReadM :: ReadM a -> String -> Maybe a
+runReadM r s = either (const Nothing) Just $
+    runExcept (runReaderT (Options.unReadM r) s)
+
 instance ParseField Bool
 instance ParseField Double
 instance ParseField Float
@@ -654,7 +662,7 @@
 >     , bar :: Double <?> "Documentation for the bar flag"
 >     } deriving (Generic, Show)
 -}
-newtype (<?>) (field :: *) (help :: Symbol) = Helpful { unHelpful :: field } 
deriving (Generic, Show)
+newtype (<?>) (field :: *) (help :: Symbol) = Helpful { unHelpful :: field } 
deriving (Generic, Show, Data)
 
 instance (ParseField a, KnownSymbol h) => ParseField (a <?> h) where
     parseField _ m c d = Helpful <$>
@@ -675,7 +683,7 @@
 >     , bar :: Double <!> "0.5"
 >     } deriving (Generic, Show)
 -}
-newtype (<!>) (field :: *) (value :: Symbol) = DefValue { unDefValue :: field 
} deriving (Generic, Show)
+newtype (<!>) (field :: *) (value :: Symbol) = DefValue { unDefValue :: field 
} deriving (Generic, Show, Data)
 
 instance (ParseField a, KnownSymbol d) => ParseField (a <!> d) where
     parseField h m c _ = DefValue <$> parseField h m c (Just (symbolVal (Proxy 
:: Proxy d)))
@@ -695,7 +703,7 @@
 >     , bar :: Double <#> "b"
 >     } deriving (Generic, Show)
 -}
-newtype (<#>) (field :: *) (value :: Symbol) = ShortName { unShortName :: 
field } deriving (Generic, Show)
+newtype (<#>) (field :: *) (value :: Symbol) = ShortName { unShortName :: 
field } deriving (Generic, Show, Data)
 
 instance (ParseField a, KnownSymbol c) => ParseField (a <#> c) where
     parseField h m _ d = ShortName <$> parseField h m (listToMaybe (symbolVal 
(Proxy :: Proxy c))) d

Reply via email to