Hello community,

here is the log from the commit of package ghc-errors for openSUSE:Factory 
checked in at 2017-08-31 20:50:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-errors (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-errors.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-errors"

Thu Aug 31 20:50:40 2017 rev:6 rq:513236 version:2.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-errors/ghc-errors.changes    2017-01-12 
15:48:29.533740771 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-errors.new/ghc-errors.changes       
2017-08-31 20:50:40.484202270 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:04:40 UTC 2017 - [email protected]
+
+- Update to version 2.2.1.
+
+-------------------------------------------------------------------

Old:
----
  errors-2.1.3.tar.gz

New:
----
  errors-2.2.1.tar.gz

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

Other differences:
------------------
++++++ ghc-errors.spec ++++++
--- /var/tmp/diff_new_pack.S1bKIU/_old  2017-08-31 20:50:41.456065848 +0200
+++ /var/tmp/diff_new_pack.S1bKIU/_new  2017-08-31 20:50:41.480062480 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-errors
 #
-# 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 errors
 Name:           ghc-%{pkg_name}
-Version:        2.1.3
+Version:        2.2.1
 Release:        0
 Summary:        Simplified error-handling
 License:        BSD-3-Clause
@@ -26,8 +26,10 @@
 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
+BuildRequires:  ghc-exceptions-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
+BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-transformers-compat-devel
 BuildRequires:  ghc-transformers-devel
 BuildRequires:  ghc-unexceptionalio-devel

++++++ errors-2.1.3.tar.gz -> errors-2.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/errors-2.1.3/CHANGELOG.md 
new/errors-2.2.1/CHANGELOG.md
--- old/errors-2.1.3/CHANGELOG.md       2016-11-28 18:41:02.000000000 +0100
+++ new/errors-2.2.1/CHANGELOG.md       2017-06-17 23:10:21.000000000 +0200
@@ -1,3 +1,20 @@
+# 2.2.1
+
+* Add precedence and fixity for `(?:)`
+
+# 2.2.0
+
+* BREAKING CHANGE: Use `Text` instead of `String`
+* Add `handleExceptT`
+
+# 2.1.3
+
+* Support older versions of `ghc`
+
+# 2.1.2
+
+* Increase upper bound on `transformers` dependency
+
 # 2.1.1
 
 * Increase upper bound on `transformers-compat`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/errors-2.1.3/Control/Error/Script.hs 
new/errors-2.2.1/Control/Error/Script.hs
--- old/errors-2.1.3/Control/Error/Script.hs    2016-11-28 18:41:02.000000000 
+0100
+++ new/errors-2.2.1/Control/Error/Script.hs    2017-06-17 23:10:21.000000000 
+0200
@@ -1,5 +1,7 @@
+{-# LANGUAGE OverloadedStrings #-}
+
 {-|
-    Use this module if you like to write simple scripts with 'String'-based
+    Use this module if you like to write simple scripts with 'Text'-based
     errors, but you prefer to use 'ExceptT' to handle errors rather than
     @Control.Exception@.
 
@@ -24,6 +26,8 @@
 import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT)
 import Control.Error.Util (errLn)
 import Data.EitherR (fmapL)
+import Data.Monoid ((<>))
+import Data.Text (Text)
 import System.Environment (getProgName)
 import System.Exit (exitFailure)
 
@@ -31,8 +35,10 @@
 import Control.Monad.Trans.Class (lift)
 import System.IO (stderr)
 
--- | An 'IO' action that can fail with a 'String' error message
-type Script = ExceptT String IO
+import qualified Data.Text
+
+-- | An 'IO' action that can fail with a 'Text' error message
+type Script = ExceptT Text IO
 
 {-| Runs the 'Script' monad
 
@@ -43,17 +49,18 @@
     e <- runExceptT s
     case e of
         Left  e -> do
-            errLn =<< liftM (++ ": " ++ e) getProgName
+            let adapt str = Data.Text.pack str <> ": " <> e
+            errLn =<< liftM adapt getProgName
             exitFailure
         Right a -> return a
 
 {-| 'scriptIO' resembles 'lift', except it catches all exceptions and converts
-    them to 'String's.
+    them to 'Text'
 
     Note that 'scriptIO' is compatible with the 'Script' monad.
 -}
-scriptIO :: (MonadIO m) => IO a -> ExceptT String m a
+scriptIO :: (MonadIO m) => IO a -> ExceptT Text m a
 scriptIO = ExceptT
          . liftIO
-         . liftM (fmapL show)
+         . liftM (fmapL (Data.Text.pack . show))
          . (try :: IO a -> IO (Either SomeException a))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/errors-2.1.3/Control/Error/Util.hs 
new/errors-2.2.1/Control/Error/Util.hs
--- old/errors-2.1.3/Control/Error/Util.hs      2016-11-28 18:41:02.000000000 
+0100
+++ new/errors-2.2.1/Control/Error/Util.hs      2017-06-17 23:10:21.000000000 
+0200
@@ -47,23 +47,27 @@
 
     -- * Exceptions
     tryIO,
+    handleExceptT,
     syncIO
     ) where
 
 import Control.Applicative (Applicative, pure, (<$>))
-import Control.Exception (Handler(..), IOException, SomeException)
+import Control.Exception (Handler(..), IOException, SomeException, Exception)
 import Control.Monad (liftM)
+import Control.Monad.Catch (MonadCatch, try)
 import Control.Monad.IO.Class (MonadIO(liftIO))
-import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT)
+import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT, withExceptT)
 import Control.Monad.Trans.Maybe (MaybeT(MaybeT), runMaybeT)
 import Data.Dynamic (Dynamic)
 import Data.Monoid (Monoid(mempty, mappend))
 import Data.Maybe (fromMaybe)
+import Data.Text (Text)
 import System.Exit (ExitCode)
 import System.IO (hPutStr, hPutStrLn, stderr)
 import UnexceptionalIO (UIO, Unexceptional)
 
 import qualified Control.Exception as Exception
+import qualified Data.Text.IO
 import qualified UnexceptionalIO   as UIO
 
 -- | Fold an 'ExceptT' by providing one continuation for each constructor
@@ -123,6 +127,8 @@
 maybeA ?: b = fromMaybe b maybeA
 {-# INLINABLE (?:) #-}
 
+infixr 0 ?:
+
 {-| Convert a 'Maybe' value into the 'ExceptT' monad
 
     Named version of ('??') with arguments flipped
@@ -228,17 +234,22 @@
 fmapRT = liftM
 
 -- | Write a string to standard error
-err :: String -> IO ()
-err = hPutStr stderr
+err :: Text -> IO ()
+err = Data.Text.IO.hPutStr stderr
 
 -- | Write a string with a newline to standard error
-errLn :: String -> IO ()
-errLn = hPutStrLn stderr
+errLn :: Text -> IO ()
+errLn = Data.Text.IO.hPutStrLn stderr
 
 -- | Catch 'IOException's and convert them to the 'ExceptT' monad
 tryIO :: MonadIO m => IO a -> ExceptT IOException m a
 tryIO = ExceptT . liftIO . Exception.try
 
+-- | Run a monad action which may throw an exception in the `ExceptT` monad
+handleExceptT :: (Exception e, Functor m, MonadCatch m) => (e -> x) -> m a -> 
ExceptT x m a
+handleExceptT handler = bimapExceptT handler id . ExceptT . try
+
+
 {-| Catch all exceptions, except for asynchronous exceptions found in @base@
     and convert them to the 'ExceptT' monad
 -}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/errors-2.1.3/Control/Error.hs 
new/errors-2.2.1/Control/Error.hs
--- old/errors-2.1.3/Control/Error.hs   2016-11-28 18:41:02.000000000 +0100
+++ new/errors-2.2.1/Control/Error.hs   2017-06-17 23:10:21.000000000 +0200
@@ -10,7 +10,7 @@
       'EitherT', and 'MonadPlus' variations on total functions
 
     * "Control.Error.Script": Support for simple scripts that catch all errors
-      and transform them to 'String's
+      and transform them to 'Text'
 
     * "Control.Error.Util": Utility functions and conversions between common
       error-handling types
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/errors-2.1.3/Data/EitherR.hs 
new/errors-2.2.1/Data/EitherR.hs
--- old/errors-2.1.3/Data/EitherR.hs    2016-11-28 23:34:12.000000000 +0100
+++ new/errors-2.2.1/Data/EitherR.hs    2017-06-17 23:10:21.000000000 +0200
@@ -173,7 +173,7 @@
 succeedT :: (Monad m) => r -> ExceptRT r m e
 succeedT r = ExceptRT (return r)
 
--- | 'catchT' with the arguments flipped
+-- | 'catchE' with the arguments flipped
 handleE :: (Monad m) => (a -> ExceptT b m r) -> ExceptT a m r -> ExceptT b m r
 handleE = flip catchE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/errors-2.1.3/errors.cabal 
new/errors-2.2.1/errors.cabal
--- old/errors-2.1.3/errors.cabal       2016-11-30 17:27:00.000000000 +0100
+++ new/errors-2.2.1/errors.cabal       2017-06-17 23:10:21.000000000 +0200
@@ -1,5 +1,5 @@
 Name: errors
-Version: 2.1.3
+Version: 2.2.1
 Cabal-Version: >=1.8.0.2
 Build-Type: Simple
 Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1
@@ -25,6 +25,8 @@
 Library
     Build-Depends:
         base                >= 4     && < 5  ,
+        exceptions          >= 0.6   && < 0.9,
+        text                            < 1.3,
         transformers        >= 0.2   && < 0.6,
         transformers-compat >= 0.4   && < 0.6,
         unexceptionalio     >= 0.3   && < 0.4


Reply via email to