Hello community,
here is the log from the commit of package ghc-unbounded-delays for
openSUSE:Factory checked in at 2017-06-04 01:59:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-unbounded-delays (Old)
and /work/SRC/openSUSE:Factory/.ghc-unbounded-delays.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-unbounded-delays"
Sun Jun 4 01:59:03 2017 rev:5 rq:499734 version:0.1.1.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-unbounded-delays/ghc-unbounded-delays.changes
2017-05-06 18:29:08.455549615 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-unbounded-delays.new/ghc-unbounded-delays.changes
2017-06-04 01:59:04.274623783 +0200
@@ -1,0 +2,5 @@
+Thu May 18 09:52:21 UTC 2017 - [email protected]
+
+- Update to version 0.1.1.0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
unbounded-delays-0.1.0.10.tar.gz
unbounded-delays.cabal
New:
----
unbounded-delays-0.1.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-unbounded-delays.spec ++++++
--- /var/tmp/diff_new_pack.1GHu5t/_old 2017-06-04 01:59:04.870539596 +0200
+++ /var/tmp/diff_new_pack.1GHu5t/_new 2017-06-04 01:59:04.870539596 +0200
@@ -18,14 +18,13 @@
%global pkg_name unbounded-delays
Name: ghc-%{pkg_name}
-Version: 0.1.0.10
+Version: 0.1.1.0
Release: 0
Summary: Unbounded thread delays and timeouts
License: BSD-3-Clause
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#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -49,7 +48,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ unbounded-delays-0.1.0.10.tar.gz -> unbounded-delays-0.1.1.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/unbounded-delays-0.1.0.10/Control/Concurrent/Timeout.hs
new/unbounded-delays-0.1.1.0/Control/Concurrent/Timeout.hs
--- old/unbounded-delays-0.1.0.10/Control/Concurrent/Timeout.hs 2017-03-27
20:09:15.000000000 +0200
+++ new/unbounded-delays-0.1.1.0/Control/Concurrent/Timeout.hs 2017-05-05
03:36:24.000000000 +0200
@@ -15,7 +15,7 @@
-- Wait arbitrarily long for an IO computation to finish.
-------------------------------------------------------------------------------
-module Control.Concurrent.Timeout ( timeout ) where
+module Control.Concurrent.Timeout ( timeout, Timeout, timeoutWithPred ) where
-------------------------------------------------------------------------------
@@ -26,8 +26,9 @@
import Control.Concurrent ( forkIOWithUnmask, myThreadId, throwTo,
killThread )
import Control.Exception ( Exception, bracket, handleJust )
import Control.Monad ( return, (>>), fmap )
-import Data.Bool ( otherwise )
+import Data.Bool ( Bool(False), otherwise )
import Data.Eq ( Eq, (==) )
+import Data.Function ( (.), const)
import Data.Maybe ( Maybe(Nothing, Just) )
import Data.Ord ( (<) )
import Data.Typeable ( Typeable )
@@ -41,7 +42,7 @@
import Control.Monad ( (>>=), fail )
#endif
-#ifdef __HADDOCK__
+#ifdef __HADDOCK_VERSION__
import Data.Int ( Int )
import System.IO ( hGetBuf, hPutBuf, hWaitForInput )
import qualified System.Timeout ( timeout )
@@ -71,13 +72,17 @@
{-|
Like @System.Timeout.'System.Timeout.timeout'@, but not bounded by an 'Int'.
-
+(..)
Wrap an 'IO' computation to time out and return 'Nothing' in case no result is
available within @n@ microseconds (@1\/10^6@ seconds). In case a result is
available before the timeout expires, 'Just' @a@ is returned. A negative
timeout
interval means \"wait indefinitely\".
-The design of this combinator was guided by the objective that @timeout n f@
+If the computation has not terminated after @n@ microseconds, it is interrupted
+by an asynchronous exception. The function passed to @f@ can be used to detect
+whether it was interrupted by this timeout or some other exception.
+
+The design of this combinator was guided by the objective that @timeout n
(const f)@
should behave exactly the same as @f@ as long as @f@ doesn't time out. This
means that @f@ has the same 'myThreadId' it would have without the timeout
wrapper. Any exceptions @f@ might throw cancel the timeout and propagate
further
@@ -99,9 +104,9 @@
@select(2)@ to perform asynchronous I\/O, so it is possible to interrupt
standard socket I\/O or file I\/O using this combinator.
-}
-timeout :: Integer -> IO α -> IO (Maybe α)
-timeout n f
- | n < 0 = fmap Just f
+timeoutWithPred :: Integer -> ((Timeout -> Bool) -> IO α) -> IO (Maybe α)
+timeoutWithPred n f
+ | n < 0 = fmap Just (f (const False))
| n == 0 = return Nothing
| otherwise = do
pid <- myThreadId
@@ -110,5 +115,11 @@
(\_ -> return Nothing)
(bracket (forkIOWithUnmask (\unmask -> unmask (delay n >>
throwTo pid ex)))
(killThread)
- (\_ -> fmap Just f)
+ (\_ -> fmap Just (f (==ex)))
)
+
+{-|
+Like 'timeoutWithPred', but does not expose the 'Timeout' exception to the
called action.
+-}
+timeout :: Integer -> IO α -> IO (Maybe α)
+timeout n = timeoutWithPred n . const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/unbounded-delays-0.1.0.10/Setup.hs
new/unbounded-delays-0.1.1.0/Setup.hs
--- old/unbounded-delays-0.1.0.10/Setup.hs 2017-03-27 20:09:15.000000000
+0200
+++ new/unbounded-delays-0.1.1.0/Setup.hs 2017-05-05 03:36:24.000000000
+0200
@@ -1,19 +1,2 @@
-#! /usr/bin/env runhaskell
-
-import Distribution.Simple ( defaultMainWithHooks
- , simpleUserHooks
- , UserHooks(haddockHook)
- )
-import Distribution.Simple.Setup ( HaddockFlags )
-import Distribution.Simple.Program ( userSpecifyArgs )
-import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(withPrograms) )
-import Distribution.PackageDescription ( PackageDescription )
-
-main :: IO ()
-main = defaultMainWithHooks $ simpleUserHooks { haddockHook = haddockHook' }
-
--- Define __HADDOCK__ for CPP when running haddock.
-haddockHook' :: PackageDescription -> LocalBuildInfo -> UserHooks ->
HaddockFlags -> IO ()
-haddockHook' pkg lbi = haddockHook simpleUserHooks pkg $ lbi { withPrograms =
p }
- where
- p = userSpecifyArgs "haddock" ["--optghc=-D__HADDOCK__"] (withPrograms
lbi)
+import Distribution.Simple
+main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/unbounded-delays-0.1.0.10/unbounded-delays.cabal
new/unbounded-delays-0.1.1.0/unbounded-delays.cabal
--- old/unbounded-delays-0.1.0.10/unbounded-delays.cabal 2017-03-27
20:09:15.000000000 +0200
+++ new/unbounded-delays-0.1.1.0/unbounded-delays.cabal 2017-05-05
03:36:24.000000000 +0200
@@ -1,7 +1,7 @@
name: unbounded-delays
-version: 0.1.0.10
+version: 0.1.1.0
cabal-version: >= 1.6
-build-type: Custom
+build-type: Simple
author: Bas van Dijk <[email protected]>
Roel van Dijk <[email protected]>
maintainer: Bas van Dijk <[email protected]>