Hello community,

here is the log from the commit of package ghc-resourcet for openSUSE:Factory 
checked in at 2017-01-18 21:44:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-resourcet (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-resourcet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-resourcet"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-resourcet/ghc-resourcet.changes      
2016-12-06 14:25:33.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-resourcet.new/ghc-resourcet.changes 
2017-01-18 21:44:21.650906922 +0100
@@ -1,0 +2,5 @@
+Mon Jan  9 06:36:40 UTC 2017 - psim...@suse.com
+
+- Update to version 1.1.9 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  resourcet-1.1.8.1.tar.gz

New:
----
  resourcet-1.1.9.tar.gz

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

Other differences:
------------------
++++++ ghc-resourcet.spec ++++++
--- /var/tmp/diff_new_pack.ayIdkS/_old  2017-01-18 21:44:22.106842433 +0100
+++ /var/tmp/diff_new_pack.ayIdkS/_new  2017-01-18 21:44:22.106842433 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-resourcet
 #
-# 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
@@ -19,7 +19,7 @@
 %global pkg_name resourcet
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.1.8.1
+Version:        1.1.9
 Release:        0
 Summary:        Deterministic allocation and freeing of scarce resources
 License:        BSD-3-Clause

++++++ resourcet-1.1.8.1.tar.gz -> resourcet-1.1.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resourcet-1.1.8.1/ChangeLog.md 
new/resourcet-1.1.9/ChangeLog.md
--- old/resourcet-1.1.8.1/ChangeLog.md  2016-11-07 07:48:07.000000000 +0100
+++ new/resourcet-1.1.9/ChangeLog.md    2016-12-20 11:01:09.000000000 +0100
@@ -1,3 +1,7 @@
+## 1.1.9
+
+* Add generalized version of resourceForkIO
+
 ## 1.1.8.1
 
 * Allocation actions should be masked
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resourcet-1.1.8.1/Control/Monad/Trans/Resource.hs 
new/resourcet-1.1.9/Control/Monad/Trans/Resource.hs
--- old/resourcet-1.1.8.1/Control/Monad/Trans/Resource.hs       2016-11-07 
07:48:07.000000000 +0100
+++ new/resourcet-1.1.9/Control/Monad/Trans/Resource.hs 2016-12-20 
11:01:09.000000000 +0100
@@ -25,6 +25,7 @@
       -- * Unwrap
     , runResourceT
       -- * Special actions
+    , resourceForkWith
     , resourceForkIO
       -- * Monad transformation
     , transResourceT
@@ -131,7 +132,7 @@
 resourceMask r = liftResourceT (resourceMaskRIO r)
 
 allocateRIO :: IO a -> (a -> IO ()) -> ResourceT IO (ReleaseKey, a)
-allocateRIO acquire rel = ResourceT $ \istate -> liftIO $ E.mask $ \restore -> 
do
+allocateRIO acquire rel = ResourceT $ \istate -> liftIO $ E.mask_ $ do
     a <- acquire
     key <- register' istate $ rel a
     return (key, a)
@@ -243,17 +244,20 @@
 -- shared by multiple threads. Once the last thread exits, all remaining
 -- resources will be released.
 --
+-- The first parameter is a function which will be used to create the
+-- thread, such as @forkIO@ or @async@.
+--
 -- Note that abuse of this function will greatly delay the deallocation of
 -- registered resources. This function should be used with care. A general
 -- guideline:
 --
 -- If you are allocating a resource that should be shared by multiple threads,
 -- and will be held for a long time, you should allocate it at the beginning of
--- a new @ResourceT@ block and then call @resourceForkIO@ from there.
+-- a new @ResourceT@ block and then call @resourceForkWith@ from there.
 --
--- Since 0.3.0
-resourceForkIO :: MonadBaseControl IO m => ResourceT m () -> ResourceT m 
ThreadId
-resourceForkIO (ResourceT f) = ResourceT $ \r -> L.mask $ \restore ->
+-- @since 1.1.9
+resourceForkWith :: MonadBaseControl IO m => (IO () -> IO a) -> ResourceT m () 
-> ResourceT m a
+resourceForkWith g (ResourceT f) = ResourceT $ \r -> L.mask $ \restore ->
     -- We need to make sure the counter is incremented before this call
     -- returns. Otherwise, the parent thread may call runResourceT before
     -- the child thread increments, and all resources will be freed
@@ -262,13 +266,19 @@
         (stateAlloc r)
         (return ())
         (return ())
-        (liftBaseDiscard forkIO $ bracket_
+        (liftBaseDiscard g $ bracket_
             (return ())
             (stateCleanup ReleaseNormal r)
             (stateCleanup ReleaseException r)
             (restore $ f r))
 
-
+-- | Launch a new reference counted resource context using @forkIO@.
+--
+-- This is defined as @resourceForkWith forkIO@.
+--
+-- @since 0.3.0
+resourceForkIO :: MonadBaseControl IO m => ResourceT m () -> ResourceT m 
ThreadId
+resourceForkIO = resourceForkWith forkIO
 
 -- | A @Monad@ which can be used as a base for a @ResourceT@.
 --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/resourcet-1.1.8.1/resourcet.cabal 
new/resourcet-1.1.9/resourcet.cabal
--- old/resourcet-1.1.8.1/resourcet.cabal       2016-11-07 07:48:07.000000000 
+0100
+++ new/resourcet-1.1.9/resourcet.cabal 2016-12-20 11:01:09.000000000 +0100
@@ -1,5 +1,5 @@
 Name:                resourcet
-Version:             1.1.8.1
+Version:             1.1.9
 Synopsis:            Deterministic allocation and freeing of scarce resources.
 description:         Hackage documentation generation is not reliable. For up 
to date documentation, please see: <http://www.stackage.org/package/resourcet>.
 License:             BSD3


Reply via email to