Hello community,

here is the log from the commit of package ghc-pipes-safe for openSUSE:Factory 
checked in at 2017-03-14 10:05:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pipes-safe (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-pipes-safe.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-pipes-safe"

Tue Mar 14 10:05:47 2017 rev:2 rq:461673 version:2.2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-pipes-safe/ghc-pipes-safe.changes    
2016-10-22 13:16:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-pipes-safe.new/ghc-pipes-safe.changes       
2017-03-14 10:05:48.238690075 +0100
@@ -1,0 +2,5 @@
+Sun Feb 12 14:10:34 UTC 2017 - [email protected]
+
+- Update to version 2.2.5 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  1.cabal
  pipes-safe-2.2.4.tar.gz

New:
----
  pipes-safe-2.2.5.tar.gz

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

Other differences:
------------------
++++++ ghc-pipes-safe.spec ++++++
--- /var/tmp/diff_new_pack.iJBiOb/_old  2017-03-14 10:05:48.750617586 +0100
+++ /var/tmp/diff_new_pack.iJBiOb/_new  2017-03-14 10:05:48.750617586 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-pipes-safe
 #
-# 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,16 +18,14 @@
 
 %global pkg_name pipes-safe
 Name:           ghc-%{pkg_name}
-Version:        2.2.4
+Version:        2.2.5
 Release:        0
 Summary:        Safety for the pipes ecosystem
 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
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-exceptions-devel
 BuildRequires:  ghc-monad-control-devel
@@ -37,7 +35,6 @@
 BuildRequires:  ghc-transformers-base-devel
 BuildRequires:  ghc-transformers-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 This package adds resource management and exception handling to the 'pipes'
@@ -70,17 +67,13 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
-
 
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ pipes-safe-2.2.4.tar.gz -> pipes-safe-2.2.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipes-safe-2.2.4/README.md 
new/pipes-safe-2.2.5/README.md
--- old/pipes-safe-2.2.4/README.md      2016-05-28 22:16:50.000000000 +0200
+++ new/pipes-safe-2.2.5/README.md      2016-12-03 02:05:13.000000000 +0100
@@ -1,4 +1,4 @@
-# Pipes-Safe v2.2.4
+# Pipes-Safe v2.2.5
 
 `pipes-safe` builds upon
 [the `pipes` library](https://github.com/Gabriel439/Haskell-Pipes-Library) to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipes-safe-2.2.4/pipes-safe.cabal 
new/pipes-safe-2.2.5/pipes-safe.cabal
--- old/pipes-safe-2.2.4/pipes-safe.cabal       2016-05-28 22:15:23.000000000 
+0200
+++ new/pipes-safe-2.2.5/pipes-safe.cabal       2016-12-03 02:05:07.000000000 
+0100
@@ -1,5 +1,5 @@
 Name: pipes-safe
-Version: 2.2.4
+Version: 2.2.5
 Cabal-Version: >=1.8.0.2
 Build-Type: Simple
 License: BSD3
@@ -8,7 +8,7 @@
 Copyright: 2013, 2014 Gabriel Gonzalez
 Author: Gabriel Gonzalez
 Maintainer: [email protected]
-Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1
+Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 
8.0.1
 Bug-Reports: https://github.com/Gabriel439/Haskell-Pipes-Safe-Library/issues
 Synopsis: Safety for the pipes ecosystem
 Description:
@@ -43,7 +43,7 @@
         transformers      >= 0.2.0.0 && < 0.6,
         transformers-base >= 0.4.4   && < 0.5,
         monad-control     >= 1.0.0.4 && < 1.1,
-        pipes             >= 4.0.0   && < 4.3
+        pipes             >= 4.3.0   && < 4.4
     Exposed-Modules:
         Pipes.Safe,
         Pipes.Safe.Prelude
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipes-safe-2.2.4/src/Pipes/Safe.hs 
new/pipes-safe-2.2.5/src/Pipes/Safe.hs
--- old/pipes-safe-2.2.4/src/Pipes/Safe.hs      2016-05-28 18:59:16.000000000 
+0200
+++ new/pipes-safe-2.2.5/src/Pipes/Safe.hs      2016-12-03 02:03:11.000000000 
+0100
@@ -74,6 +74,8 @@
       -- * Utilities
       -- $utilities
     , onException
+    , tryP
+    , catchP
     , finally
     , bracket
     , bracket_
@@ -105,12 +107,12 @@
     , handleIOError
     , handleJust
     , handleIf
-    , try
     , tryJust
     , Exception(..)
     , SomeException
     )
-import Control.Monad (MonadPlus)
+import Control.Monad (MonadPlus, liftM)
+import Control.Monad.Fix (MonadFix)
 import Control.Monad.IO.Class (MonadIO(liftIO))
 import Control.Monad.Trans.Control (MonadBaseControl(..))
 import Control.Monad.Trans.Class (MonadTrans(lift))
@@ -128,7 +130,11 @@
 import qualified Control.Monad.Trans.Writer.Lazy   as W
 import qualified Control.Monad.Trans.Writer.Strict as W'
 import qualified Control.Monad.Writer.Class        as WC
+#if MIN_VERSION_base(4,6,0)
 import Data.IORef (IORef, newIORef, readIORef, writeIORef, atomicModifyIORef')
+#else
+import Data.IORef (IORef, newIORef, readIORef, writeIORef, atomicModifyIORef)
+#endif
 import qualified Data.Map as M
 import Data.Monoid (Monoid)
 import Pipes (Proxy, Effect, Effect', runEffect)
@@ -173,12 +179,6 @@
 
     loop $ k unmask
 
-instance (MonadThrow m) => MonadThrow (Proxy a' a b' b m) where
-    throwM = lift . throwM
-
-instance (MonadCatch m) => MonadCatch (Proxy a' a b' b m) where
-    catch = liftCatchError C.catch
-
 instance (MonadMask m, MonadIO m) => MonadMask (Proxy a' a b' b m) where
     mask                = liftMask mask
     uninterruptibleMask = liftMask uninterruptibleMask
@@ -195,7 +195,7 @@
     in the event of exceptions.
 -}
 newtype SafeT m r = SafeT { unSafeT :: R.ReaderT (IORef (Maybe (Finalizers 
m))) m r }
-    deriving (Functor, Applicative, Alternative, Monad, MonadPlus,
+    deriving (Functor, Applicative, Alternative, Monad, MonadPlus, MonadFix,
               EC.MonadError e, SC.MonadState s, WC.MonadWriter w, CC.MonadCont,
               MonadThrow, MonadCatch, MonadMask, MonadIO, B.MonadBase b)
 
@@ -224,7 +224,11 @@
 runSafeT m = C.bracket
     (liftIO $ newIORef $! Just $! Finalizers 0 M.empty)
     (\ioref -> do
+#if MIN_VERSION_base(4,6,0)
         mres <- liftIO $ atomicModifyIORef' ioref $ \val ->
+#else
+        mres <- liftIO $ atomicModifyIORef ioref $ \val ->
+#endif
             (Nothing, val)
         case mres of
             Nothing -> error "runSafeT's resources were freed by another"
@@ -278,7 +282,11 @@
     register io = do
         ioref <- SafeT R.ask
         liftIO $ do
+#if MIN_VERSION_base(4,6,0)
             n <- atomicModifyIORef' ioref $ \val ->
+#else
+            n <- atomicModifyIORef ioref $ \val ->
+#endif
                 case val of
                     Nothing -> error "register: SafeT block is closed"
                     Just (Finalizers n fs) ->
@@ -287,7 +295,11 @@
 
     release key = do
         ioref <- SafeT R.ask
+#if MIN_VERSION_base(4,6,0)
         liftIO $ atomicModifyIORef' ioref $ \val ->
+#else
+        liftIO $ atomicModifyIORef ioref $ \val ->
+#endif
             case val of
                 Nothing -> error "release: SafeT block is closed"
                 Just (Finalizers n fs) ->
@@ -432,3 +444,29 @@
 
     @Control.Exception@ re-exports 'Exception' and 'SomeException'.
 -}
+
+{- | Transform a 'Proxy' into one that catches any exceptions caused by its
+     effects, and returns the resulting exception.
+-}
+tryP :: (MonadSafe m, Exception e)
+     => Proxy a' a b' b m r -> Proxy a' a b' b m (Either e r)
+tryP p = case p of
+    Request  a' fa  -> Request a' (\a  -> tryP (fa  a))
+    Respond  b  fb' -> Respond b  (\b' -> tryP (fb' b'))
+    M        m      -> M $ C.try m >>= \eres -> return $ case eres of
+        Left  e -> Pure (Left e)
+        Right a -> tryP a
+    Pure     r      -> Pure (Right r)
+
+{- | Allows direct handling of exceptions raised by the effects in a 'Proxy'.
+-}
+catchP :: (MonadSafe m, Exception e)
+       => Proxy a' a b' b m r -> (e -> Proxy a' a b' b m r)
+       -> Proxy a' a b' b m r
+catchP p0 f = go p0
+  where
+    go p = case p of
+        Request  a' fa  -> Request a' (\a  -> go (fa  a))
+        Respond  b  fb' -> Respond b  (\b' -> go (fb' b'))
+        M        m      -> M $ C.catch (liftM go m) (return . f)
+        Pure     r      -> Pure r


Reply via email to