openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2022
- 1 participants
- 2549 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-rio for openSUSE:Factory checked in at 2022-08-01 21:30:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-rio (Old)
and /work/SRC/openSUSE:Factory/.ghc-rio.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-rio"
Mon Aug 1 21:30:26 2022 rev:20 rq:987085 version:0.1.22.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-rio/ghc-rio.changes 2021-08-25 20:58:50.785110920 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-rio.new.1533/ghc-rio.changes 2022-08-01 21:30:46.933722440 +0200
@@ -1,0 +2,8 @@
+Mon Apr 25 16:17:34 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update rio to version 0.1.22.0.
+ ## 0.1.22.0
+
+ * Expose `augmentPathMap'`
+
+-------------------------------------------------------------------
Old:
----
rio-0.1.21.0.tar.gz
New:
----
rio-0.1.22.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-rio.spec ++++++
--- /var/tmp/diff_new_pack.eVHiNJ/_old 2022-08-01 21:30:47.597724345 +0200
+++ /var/tmp/diff_new_pack.eVHiNJ/_new 2022-08-01 21:30:47.605724368 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-rio
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# 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 rio
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.21.0
+Version: 0.1.22.0
Release: 0
Summary: A standard library for Haskell
License: MIT
++++++ rio-0.1.21.0.tar.gz -> rio-0.1.22.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.21.0/ChangeLog.md new/rio-0.1.22.0/ChangeLog.md
--- old/rio-0.1.21.0/ChangeLog.md 2021-08-09 16:53:57.000000000 +0200
+++ new/rio-0.1.22.0/ChangeLog.md 2022-04-25 18:16:03.000000000 +0200
@@ -1,5 +1,9 @@
# Changelog for rio
+## 0.1.22.0
+
+* Expose `augmentPathMap'`
+
## 0.1.21.0
* Fix minor bug in `augmentPathMap` on windows wrt [#234](https://github.com/commercialhaskell/rio/issues/234) not adhering to case-insensitive semantics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.21.0/rio.cabal new/rio-0.1.22.0/rio.cabal
--- old/rio-0.1.21.0/rio.cabal 2021-08-09 16:54:24.000000000 +0200
+++ new/rio-0.1.22.0/rio.cabal 2022-04-25 18:16:06.000000000 +0200
@@ -5,7 +5,7 @@
-- see: https://github.com/sol/hpack
name: rio
-version: 0.1.21.0
+version: 0.1.22.0
synopsis: A standard library for Haskell
description: See README and Haddocks at <https://www.stackage.org/package/rio>
category: Control
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.21.0/src/RIO/Prelude/Logger.hs new/rio-0.1.22.0/src/RIO/Prelude/Logger.hs
--- old/rio-0.1.21.0/src/RIO/Prelude/Logger.hs 2021-08-09 05:30:06.000000000 +0200
+++ new/rio-0.1.22.0/src/RIO/Prelude/Logger.hs 2022-04-25 11:55:31.000000000 +0200
@@ -544,7 +544,7 @@
setLogVerboseFormatIO getVerboseLevel options =
options { logVerboseFormat = getVerboseLevel }
--- | Do we treat output as a terminal. If @True@, we will enabled
+-- | Do we treat output as a terminal. If @True@, we will enable
-- sticky logging functionality.
--
-- Default: checks if the @Handle@ provided to 'logOptionsHandle' is a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.21.0/src/RIO/Process.hs new/rio-0.1.22.0/src/RIO/Process.hs
--- old/rio-0.1.21.0/src/RIO/Process.hs 2021-08-09 16:53:57.000000000 +0200
+++ new/rio-0.1.22.0/src/RIO/Process.hs 2022-04-25 11:55:31.000000000 +0200
@@ -77,6 +77,7 @@
, exeExtensions
, augmentPath
, augmentPathMap
+ , augmentPathMap'
, showProcessArgDebug
-- * Reexports
, P.ProcessConfig
@@ -659,8 +660,9 @@
pc <- view processContextL
return $ pcExeExtensions pc
--- | Augment the PATH environment variable with the given extra paths,
--- which are prepended (as in: they take precedence).
+-- | Augment the given value (assumed to be that of an environment variable
+-- that lists paths, such as PATH; this is not checked) with the given extra
+-- paths. Those paths are prepended (as in: they take precedence).
--
-- @since 0.0.3.0
augmentPath :: [FilePath] -> Maybe Text -> Either ProcessException Text
@@ -672,15 +674,29 @@
++ maybeToList mpath
illegal -> Left $ PathsInvalidInPath illegal
--- | Apply 'augmentPath' on the PATH value in the given 'EnvVars'.
+-- | Apply 'augmentPath' on the value of the PATH environment variable in the
+-- given 'EnvVars'.
--
-- @since 0.0.3.0
augmentPathMap :: [FilePath] -> EnvVars -> Either ProcessException EnvVars
-augmentPathMap dirs (normalizePathEnv -> origEnv) =
+augmentPathMap = augmentPathMap' "PATH"
+
+-- | Apply 'augmentPath' on the value of the given environment variable in the
+-- given 'EnvVars'.
+--
+-- @since 0.1.22.0
+augmentPathMap'
+ :: Text
+ -- ^ Environment variable. If it does not already exist in the given
+ -- 'EnvVars', it will be created.
+ -> [FilePath]
+ -> EnvVars
+ -> Either ProcessException EnvVars
+augmentPathMap' envVar dirs (normalizePathEnv -> origEnv) =
do path <- augmentPath dirs mpath
- return $ Map.insert "PATH" path origEnv
+ return $ Map.insert envVar path origEnv
where
- mpath = Map.lookup "PATH" origEnv
+ mpath = Map.lookup envVar origEnv
-- | Show a process arg including speechmarks when necessary. Just for
-- debugging purposes, not functionally important.
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-retry for openSUSE:Factory checked in at 2022-08-01 21:30:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-retry (Old)
and /work/SRC/openSUSE:Factory/.ghc-retry.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-retry"
Mon Aug 1 21:30:25 2022 rev:5 rq:987084 version:0.9.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-retry/ghc-retry.changes 2022-02-11 23:11:30.471310110 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-retry.new.1533/ghc-retry.changes 2022-08-01 21:30:45.845719319 +0200
@@ -1,0 +2,14 @@
+Fri May 20 23:02:15 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update retry to version 0.9.2.1.
+ 0.9.2.1
+ * Use explicit import for `lift` which allows for mtl-2.3 compatibility [PR 80](https://github.com/Soostone/retry/pull/80)
+
+-------------------------------------------------------------------
+Wed Mar 2 20:25:59 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update retry to version 0.9.2.0.
+ 0.9.2.0
+ * Add `retryOnError` [PR 44](https://github.com/Soostone/retry/pull/44)
+
+-------------------------------------------------------------------
Old:
----
retry-0.9.1.0.tar.gz
New:
----
retry-0.9.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-retry.spec ++++++
--- /var/tmp/diff_new_pack.itAjQe/_old 2022-08-01 21:30:46.381720856 +0200
+++ /var/tmp/diff_new_pack.itAjQe/_new 2022-08-01 21:30:46.385720868 +0200
@@ -19,7 +19,7 @@
%global pkg_name retry
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.9.1.0
+Version: 0.9.2.1
Release: 0
Summary: Retry combinators for monadic actions that may fail
License: BSD-3-Clause
@@ -27,6 +27,8 @@
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-exceptions-devel
+BuildRequires: ghc-mtl-compat-devel
+BuildRequires: ghc-mtl-devel
BuildRequires: ghc-random-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-transformers-devel
@@ -34,7 +36,6 @@
%if %{with tests}
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-hedgehog-devel
-BuildRequires: ghc-mtl-devel
BuildRequires: ghc-stm-devel
BuildRequires: ghc-tasty-devel
BuildRequires: ghc-tasty-hedgehog-devel
++++++ retry-0.9.1.0.tar.gz -> retry-0.9.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/retry-0.9.1.0/README.md new/retry-0.9.2.1/README.md
--- old/retry-0.9.1.0/README.md 2018-08-14 17:09:35.000000000 +0200
+++ new/retry-0.9.2.1/README.md 2022-03-02 21:25:19.000000000 +0100
@@ -11,7 +11,6 @@
with IO and similar actions that often fail. Common examples are
database queries and large file uploads.
-
## Documentation
Please see haddocks for documentation.
@@ -24,7 +23,6 @@
Ozgun Ataman, Soostone Inc
-
## Contributors
Contributors, please list yourself here.
@@ -33,5 +31,5 @@
- John Wiegley
- Michael Snoyman
- Michael Xavier
+- Toralf Wittner
- Marco Zocca (@ocramz)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/retry-0.9.1.0/changelog.md new/retry-0.9.2.1/changelog.md
--- old/retry-0.9.1.0/changelog.md 2022-01-26 00:16:12.000000000 +0100
+++ new/retry-0.9.2.1/changelog.md 2022-05-21 01:01:11.000000000 +0200
@@ -1,3 +1,9 @@
+0.9.2.1
+* Use explicit import for `lift` which allows for mtl-2.3 compatibility [PR 80](https://github.com/Soostone/retry/pull/80)
+
+0.9.2.0
+* Add `retryOnError` [PR 44](https://github.com/Soostone/retry/pull/44)
+
0.9.1.0
* Add resumable retry/recover variants:
* `resumeRetrying`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/retry-0.9.1.0/retry.cabal new/retry-0.9.2.1/retry.cabal
--- old/retry-0.9.1.0/retry.cabal 2022-01-26 00:21:01.000000000 +0100
+++ new/retry-0.9.2.1/retry.cabal 2022-05-21 01:01:22.000000000 +0200
@@ -14,7 +14,7 @@
case we should hang back for a bit and retry the query instead
of simply raising an exception.
-version: 0.9.1.0
+version: 0.9.2.1
synopsis: Retry combinators for monadic actions that may fail
license: BSD3
license-file: LICENSE
@@ -41,6 +41,8 @@
, ghc-prim
, random >= 1
, transformers
+ , mtl
+ , mtl-compat
hs-source-dirs: src
default-language: Haskell2010
@@ -67,10 +69,11 @@
, tasty
, tasty-hunit
, tasty-hedgehog
- , hedgehog
+ , hedgehog >= 1.0
, stm
, ghc-prim
, mtl
+ , mtl-compat
default-language: Haskell2010
if flag(lib-Werror)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/retry-0.9.1.0/src/Control/Retry.hs new/retry-0.9.2.1/src/Control/Retry.hs
--- old/retry-0.9.1.0/src/Control/Retry.hs 2022-01-26 00:16:12.000000000 +0100
+++ new/retry-0.9.2.1/src/Control/Retry.hs 2022-05-21 01:00:15.000000000 +0200
@@ -4,6 +4,7 @@
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TupleSections #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE ViewPatterns #-}
@@ -59,6 +60,7 @@
, skipAsyncExceptions
, logRetries
, defaultLogMsg
+ , retryOnError
-- ** Resumable variants
, resumeRetrying
, resumeRetryingDynamic
@@ -93,8 +95,9 @@
#endif
import Control.Monad
import Control.Monad.Catch
-import Control.Monad.IO.Class
-import Control.Monad.Trans.Class
+import Control.Monad.Except
+import Control.Monad.IO.Class as MIO
+import Control.Monad.Trans.Class as TC
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.State
import Data.List (foldl')
@@ -280,7 +283,7 @@
-- | Apply policy and delay by its amount if it results in a retry.
-- Return updated status.
applyAndDelay
- :: MonadIO m
+ :: MIO.MonadIO m
=> RetryPolicyM m
-> RetryStatus
-> m (Maybe RetryStatus)
@@ -817,13 +820,38 @@
-------------------------------------------------------------------------------
+retryOnError
+ :: (Functor m, MonadIO m, MonadError e m)
+ => RetryPolicyM m
+ -- ^ Policy
+ -> (RetryStatus -> e -> m Bool)
+ -- ^ Should an error be retried?
+ -> (RetryStatus -> m a)
+ -- ^ Action to perform
+ -> m a
+retryOnError policy chk f = go defaultRetryStatus
+ where
+ go stat = do
+ res <- (Right <$> f stat) `catchError` (\e -> Left . (e, ) <$> chk stat e)
+ case res of
+ Right x -> return x
+ Left (e, True) -> do
+ mstat' <- applyAndDelay policy stat
+ case mstat' of
+ Just stat' -> do
+ go $! stat'
+ Nothing -> throwError e
+ Left (e, False) -> throwError e
+
+
+-------------------------------------------------------------------------------
-- | Run given policy up to N iterations and gather results. In the
-- pair, the @Int@ is the iteration number and the @Maybe Int@ is the
-- delay in microseconds.
simulatePolicy :: Monad m => Int -> RetryPolicyM m -> m [(Int, Maybe Int)]
simulatePolicy n (RetryPolicyM f) = flip evalStateT defaultRetryStatus $ forM [0..n] $ \i -> do
stat <- get
- delay <- lift (f stat)
+ delay <- TC.lift (f stat)
put $! stat
{ rsIterNumber = i + 1
, rsCumulativeDelay = rsCumulativeDelay stat `boundedPlus` fromMaybe 0 delay
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/retry-0.9.1.0/test/Tests/Control/Retry.hs new/retry-0.9.2.1/test/Tests/Control/Retry.hs
--- old/retry-0.9.1.0/test/Tests/Control/Retry.hs 2022-01-26 00:16:12.000000000 +0100
+++ new/retry-0.9.2.1/test/Tests/Control/Retry.hs 2022-03-02 21:25:19.000000000 +0100
@@ -2,6 +2,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleContexts #-}
module Tests.Control.Retry
( tests
) where
@@ -12,8 +13,9 @@
import Control.Concurrent.STM as STM
import qualified Control.Exception as EX
import Control.Monad.Catch
+import Control.Monad.Except
import Control.Monad.Identity
-import Control.Monad.IO.Class
+import Control.Monad.IO.Class as MIO
import Control.Monad.Writer.Strict
import Data.Either
import Data.IORef
@@ -48,6 +50,7 @@
, limitRetriesByCumulativeDelayTests
, overridingDelayTests
, resumableTests
+ , retryOnErrorTests
]
@@ -451,6 +454,22 @@
-------------------------------------------------------------------------------
+retryOnErrorTests :: TestTree
+retryOnErrorTests = testGroup "retryOnError"
+ [ testCase "passes in the error type" $ do
+ errCalls <- newTVarIO []
+ let policy = limitRetries 2
+ let shouldWeRetry _retryStat e = do
+ liftIO (atomically (modifyTVar' errCalls (++ [e])))
+ return True
+ let action rs = (throwError ("boom" ++ show (rsIterNumber rs)))
+ res <- runExceptT (retryOnError policy shouldWeRetry action)
+ res @?= (Left "boom2" :: Either String ())
+ calls <- atomically (readTVar errCalls)
+ calls @?= ["boom0", "boom1", "boom2"]
+ ]
+
+-------------------------------------------------------------------------------
nextStatusUsingPolicy :: RetryPolicyM IO -> RetryStatus -> IO RetryStatus
nextStatusUsingPolicy policy status = do
applyPolicy policy status >>= \case
@@ -513,7 +532,7 @@
-------------------------------------------------------------------------------
-- | Generate an arbitrary 'RetryPolicy' without any limits applied.
genPolicyNoLimit
- :: forall mg mr. (MonadGen mg, MonadIO mr)
+ :: forall mg mr. (MonadGen mg, MIO.MonadIO mr)
=> Range Int
-> mg (RetryPolicyM mr)
genPolicyNoLimit durationRange =
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-resource-pool for openSUSE:Factory checked in at 2022-08-01 21:30:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-resource-pool (Old)
and /work/SRC/openSUSE:Factory/.ghc-resource-pool.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-resource-pool"
Mon Aug 1 21:30:24 2022 rev:11 rq:987083 version:0.3.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-resource-pool/ghc-resource-pool.changes 2020-12-22 11:45:29.457815766 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-resource-pool.new.1533/ghc-resource-pool.changes 2022-08-01 21:30:44.721716094 +0200
@@ -1,0 +2,8 @@
+Wed Jun 15 21:02:08 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update resource-pool to version 0.3.1.0.
+ Upstream added a new change log file in this release. With no
+ previous version to compare against, the automatic updater cannot
+ reliable determine the relevante entries for this release.
+
+-------------------------------------------------------------------
Old:
----
resource-pool-0.2.3.2.tar.gz
New:
----
resource-pool-0.3.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-resource-pool.spec ++++++
--- /var/tmp/diff_new_pack.UqrVXE/_old 2022-08-01 21:30:45.229717551 +0200
+++ /var/tmp/diff_new_pack.UqrVXE/_new 2022-08-01 21:30:45.237717574 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-resource-pool
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,21 +18,16 @@
%global pkg_name resource-pool
Name: ghc-%{pkg_name}
-Version: 0.2.3.2
+Version: 0.3.1.0
Release: 0
Summary: A high-performance striped resource pooling implementation
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-hashable-devel
-BuildRequires: ghc-monad-control-devel
+BuildRequires: ghc-primitive-devel
BuildRequires: ghc-rpm-macros
-BuildRequires: ghc-stm-devel
BuildRequires: ghc-time-devel
-BuildRequires: ghc-transformers-base-devel
-BuildRequires: ghc-transformers-devel
-BuildRequires: ghc-vector-devel
ExcludeArch: %{ix86}
%description
@@ -68,6 +63,6 @@
%license LICENSE
%files devel -f %{name}-devel.files
-%doc README.markdown
+%doc CHANGELOG.md README.md
%changelog
++++++ resource-pool-0.2.3.2.tar.gz -> resource-pool-0.3.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/CHANGELOG.md new/resource-pool-0.3.1.0/CHANGELOG.md
--- old/resource-pool-0.2.3.2/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-pool-0.3.1.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,10 @@
+# resource-pool-0.3.1.0 (2022-06-15)
+* Add `tryWithResource` and `tryTakeResource`.
+
+# resource-pool-0.3.0.0 (2022-06-01)
+* Rewrite based on `Control.Concurrent.QSem` for better throughput and latency.
+* Make release of resources asynchronous exceptions safe.
+* Remove dependency on `monad-control`.
+* Expose the `.Internal` module.
+* Add support for introspection.
+* Add `PoolConfig`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/Data/Pool.hs new/resource-pool-0.3.1.0/Data/Pool.hs
--- old/resource-pool-0.2.3.2/Data/Pool.hs 2014-12-16 10:01:10.000000000 +0100
+++ new/resource-pool-0.3.1.0/Data/Pool.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,393 +0,0 @@
-{-# LANGUAGE CPP, NamedFieldPuns, RecordWildCards, ScopedTypeVariables, RankNTypes, DeriveDataTypeable #-}
-
-#if MIN_VERSION_monad_control(0,3,0)
-{-# LANGUAGE FlexibleContexts #-}
-#endif
-
-#if !MIN_VERSION_base(4,3,0)
-{-# LANGUAGE RankNTypes #-}
-#endif
-
--- |
--- Module: Data.Pool
--- Copyright: (c) 2011 MailRank, Inc.
--- License: BSD3
--- Maintainer: Bryan O'Sullivan <bos(a)serpentine.com>,
--- Bas van Dijk <v.dijk.bas(a)gmail.com>
--- Stability: experimental
--- Portability: portable
---
--- A high-performance striped pooling abstraction for managing
--- flexibly-sized collections of resources such as database
--- connections.
---
--- \"Striped\" means that a single 'Pool' consists of several
--- sub-pools, each managed independently. A single stripe is fine for
--- many applications, and probably what you should choose by default.
--- More stripes will lead to reduced contention in high-performance
--- multicore applications, at a trade-off of causing the maximum
--- number of simultaneous resources in use to grow.
-module Data.Pool
- (
- Pool(idleTime, maxResources, numStripes)
- , LocalPool
- , createPool
- , withResource
- , takeResource
- , tryWithResource
- , tryTakeResource
- , destroyResource
- , putResource
- , destroyAllResources
- ) where
-
-import Control.Applicative ((<$>))
-import Control.Concurrent (ThreadId, forkIOWithUnmask, killThread, myThreadId, threadDelay)
-import Control.Concurrent.STM
-import Control.Exception (SomeException, onException, mask_)
-import Control.Monad (forM_, forever, join, liftM3, unless, when)
-import Data.Hashable (hash)
-import Data.IORef (IORef, newIORef, mkWeakIORef)
-import Data.List (partition)
-import Data.Time.Clock (NominalDiffTime, UTCTime, diffUTCTime, getCurrentTime)
-import Data.Typeable (Typeable)
-import GHC.Conc.Sync (labelThread)
-import qualified Control.Exception as E
-import qualified Data.Vector as V
-
-#if MIN_VERSION_monad_control(0,3,0)
-import Control.Monad.Trans.Control (MonadBaseControl, control)
-import Control.Monad.Base (liftBase)
-#else
-import Control.Monad.IO.Control (MonadControlIO, controlIO)
-import Control.Monad.IO.Class (liftIO)
-#define control controlIO
-#define liftBase liftIO
-#endif
-
-#if MIN_VERSION_base(4,3,0)
-import Control.Exception (mask)
-#else
--- Don't do any async exception protection for older GHCs.
-mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
-mask f = f id
-#endif
-
--- | A single resource pool entry.
-data Entry a = Entry {
- entry :: a
- , lastUse :: UTCTime
- -- ^ Time of last return.
- }
-
--- | A single striped pool.
-data LocalPool a = LocalPool {
- inUse :: TVar Int
- -- ^ Count of open entries (both idle and in use).
- , entries :: TVar [Entry a]
- -- ^ Idle entries.
- , lfin :: IORef ()
- -- ^ empty value used to attach a finalizer to (internal)
- } deriving (Typeable)
-
-data Pool a = Pool {
- create :: IO a
- -- ^ Action for creating a new entry to add to the pool.
- , destroy :: a -> IO ()
- -- ^ Action for destroying an entry that is now done with.
- , numStripes :: Int
- -- ^ The number of stripes (distinct sub-pools) to maintain.
- -- The smallest acceptable value is 1.
- , idleTime :: NominalDiffTime
- -- ^ Amount of time for which an unused resource is kept alive.
- -- The smallest acceptable value is 0.5 seconds.
- --
- -- The elapsed time before closing may be a little longer than
- -- requested, as the reaper thread wakes at 1-second intervals.
- , maxResources :: Int
- -- ^ Maximum number of resources to maintain per stripe. The
- -- smallest acceptable value is 1.
- --
- -- Requests for resources will block if this limit is reached on a
- -- single stripe, even if other stripes have idle resources
- -- available.
- , localPools :: V.Vector (LocalPool a)
- -- ^ Per-capability resource pools.
- , fin :: IORef ()
- -- ^ empty value used to attach a finalizer to (internal)
- } deriving (Typeable)
-
-instance Show (Pool a) where
- show Pool{..} = "Pool {numStripes = " ++ show numStripes ++ ", " ++
- "idleTime = " ++ show idleTime ++ ", " ++
- "maxResources = " ++ show maxResources ++ "}"
-
--- | Create a striped resource pool.
---
--- Although the garbage collector will destroy all idle resources when
--- the pool is garbage collected it's recommended to manually
--- 'destroyAllResources' when you're done with the pool so that the
--- resources are freed up as soon as possible.
-createPool
- :: IO a
- -- ^ Action that creates a new resource.
- -> (a -> IO ())
- -- ^ Action that destroys an existing resource.
- -> Int
- -- ^ The number of stripes (distinct sub-pools) to maintain.
- -- The smallest acceptable value is 1.
- -> NominalDiffTime
- -- ^ Amount of time for which an unused resource is kept open.
- -- The smallest acceptable value is 0.5 seconds.
- --
- -- The elapsed time before destroying a resource may be a little
- -- longer than requested, as the reaper thread wakes at 1-second
- -- intervals.
- -> Int
- -- ^ Maximum number of resources to keep open per stripe. The
- -- smallest acceptable value is 1.
- --
- -- Requests for resources will block if this limit is reached on a
- -- single stripe, even if other stripes have idle resources
- -- available.
- -> IO (Pool a)
-createPool create destroy numStripes idleTime maxResources = do
- when (numStripes < 1) $
- modError "pool " $ "invalid stripe count " ++ show numStripes
- when (idleTime < 0.5) $
- modError "pool " $ "invalid idle time " ++ show idleTime
- when (maxResources < 1) $
- modError "pool " $ "invalid maximum resource count " ++ show maxResources
- localPools <- V.replicateM numStripes $
- liftM3 LocalPool (newTVarIO 0) (newTVarIO []) (newIORef ())
- reaperId <- forkIOLabeledWithUnmask "resource-pool: reaper" $ \unmask ->
- unmask $ reaper destroy idleTime localPools
- fin <- newIORef ()
- let p = Pool {
- create
- , destroy
- , numStripes
- , idleTime
- , maxResources
- , localPools
- , fin
- }
- mkWeakIORef fin (killThread reaperId) >>
- V.mapM_ (\lp -> mkWeakIORef (lfin lp) (purgeLocalPool destroy lp)) localPools
- return p
-
--- TODO: Propose 'forkIOLabeledWithUnmask' for the base library.
-
--- | Sparks off a new thread using 'forkIOWithUnmask' to run the given
--- IO computation, but first labels the thread with the given label
--- (using 'labelThread').
---
--- The implementation makes sure that asynchronous exceptions are
--- masked until the given computation is executed. This ensures the
--- thread will always be labeled which guarantees you can always
--- easily find it in the GHC event log.
---
--- Like 'forkIOWithUnmask', the given computation is given a function
--- to unmask asynchronous exceptions. See the documentation of that
--- function for the motivation of this.
---
--- Returns the 'ThreadId' of the newly created thread.
-forkIOLabeledWithUnmask :: String
- -> ((forall a. IO a -> IO a) -> IO ())
- -> IO ThreadId
-forkIOLabeledWithUnmask label m = mask_ $ forkIOWithUnmask $ \unmask -> do
- tid <- myThreadId
- labelThread tid label
- m unmask
-
--- | Periodically go through all pools, closing any resources that
--- have been left idle for too long.
-reaper :: (a -> IO ()) -> NominalDiffTime -> V.Vector (LocalPool a) -> IO ()
-reaper destroy idleTime pools = forever $ do
- threadDelay (1 * 1000000)
- now <- getCurrentTime
- let isStale Entry{..} = now `diffUTCTime` lastUse > idleTime
- V.forM_ pools $ \LocalPool{..} -> do
- resources <- atomically $ do
- (stale,fresh) <- partition isStale <$> readTVar entries
- unless (null stale) $ do
- writeTVar entries fresh
- modifyTVar_ inUse (subtract (length stale))
- return (map entry stale)
- forM_ resources $ \resource -> do
- destroy resource `E.catch` \(_::SomeException) -> return ()
-
--- | Destroy all idle resources of the given 'LocalPool' and remove them from
--- the pool.
-purgeLocalPool :: (a -> IO ()) -> LocalPool a -> IO ()
-purgeLocalPool destroy LocalPool{..} = do
- resources <- atomically $ do
- idle <- swapTVar entries []
- modifyTVar_ inUse (subtract (length idle))
- return (map entry idle)
- forM_ resources $ \resource ->
- destroy resource `E.catch` \(_::SomeException) -> return ()
-
--- | Temporarily take a resource from a 'Pool', perform an action with
--- it, and return it to the pool afterwards.
---
--- * If the pool has an idle resource available, it is used
--- immediately.
---
--- * Otherwise, if the maximum number of resources has not yet been
--- reached, a new resource is created and used.
---
--- * If the maximum number of resources has been reached, this
--- function blocks until a resource becomes available.
---
--- If the action throws an exception of any type, the resource is
--- destroyed, and not returned to the pool.
---
--- It probably goes without saying that you should never manually
--- destroy a pooled resource, as doing so will almost certainly cause
--- a subsequent user (who expects the resource to be valid) to throw
--- an exception.
-withResource ::
-#if MIN_VERSION_monad_control(0,3,0)
- (MonadBaseControl IO m)
-#else
- (MonadControlIO m)
-#endif
- => Pool a -> (a -> m b) -> m b
-{-# SPECIALIZE withResource :: Pool a -> (a -> IO b) -> IO b #-}
-withResource pool act = control $ \runInIO -> mask $ \restore -> do
- (resource, local) <- takeResource pool
- ret <- restore (runInIO (act resource)) `onException`
- destroyResource pool local resource
- putResource local resource
- return ret
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE withResource #-}
-#endif
-
--- | Take a resource from the pool, following the same results as
--- 'withResource'. Note that this function should be used with caution, as
--- improper exception handling can lead to leaked resources.
---
--- This function returns both a resource and the @LocalPool@ it came from so
--- that it may either be destroyed (via 'destroyResource') or returned to the
--- pool (via 'putResource').
-takeResource :: Pool a -> IO (a, LocalPool a)
-takeResource pool@Pool{..} = do
- local@LocalPool{..} <- getLocalPool pool
- resource <- liftBase . join . atomically $ do
- ents <- readTVar entries
- case ents of
- (Entry{..}:es) -> writeTVar entries es >> return (return entry)
- [] -> do
- used <- readTVar inUse
- when (used == maxResources) retry
- writeTVar inUse $! used + 1
- return $
- create `onException` atomically (modifyTVar_ inUse (subtract 1))
- return (resource, local)
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE takeResource #-}
-#endif
-
--- | Similar to 'withResource', but only performs the action if a resource could
--- be taken from the pool /without blocking/. Otherwise, 'tryWithResource'
--- returns immediately with 'Nothing' (ie. the action function is /not/ called).
--- Conversely, if a resource can be borrowed from the pool without blocking, the
--- action is performed and it's result is returned, wrapped in a 'Just'.
-tryWithResource :: forall m a b.
-#if MIN_VERSION_monad_control(0,3,0)
- (MonadBaseControl IO m)
-#else
- (MonadControlIO m)
-#endif
- => Pool a -> (a -> m b) -> m (Maybe b)
-tryWithResource pool act = control $ \runInIO -> mask $ \restore -> do
- res <- tryTakeResource pool
- case res of
- Just (resource, local) -> do
- ret <- restore (runInIO (Just <$> act resource)) `onException`
- destroyResource pool local resource
- putResource local resource
- return ret
- Nothing -> restore . runInIO $ return (Nothing :: Maybe b)
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE tryWithResource #-}
-#endif
-
--- | A non-blocking version of 'takeResource'. The 'tryTakeResource' function
--- returns immediately, with 'Nothing' if the pool is exhausted, or @'Just' (a,
--- 'LocalPool' a)@ if a resource could be borrowed from the pool successfully.
-tryTakeResource :: Pool a -> IO (Maybe (a, LocalPool a))
-tryTakeResource pool@Pool{..} = do
- local@LocalPool{..} <- getLocalPool pool
- resource <- liftBase . join . atomically $ do
- ents <- readTVar entries
- case ents of
- (Entry{..}:es) -> writeTVar entries es >> return (return . Just $ entry)
- [] -> do
- used <- readTVar inUse
- if used == maxResources
- then return (return Nothing)
- else do
- writeTVar inUse $! used + 1
- return $ Just <$>
- create `onException` atomically (modifyTVar_ inUse (subtract 1))
- return $ (flip (,) local) <$> resource
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE tryTakeResource #-}
-#endif
-
--- | Get a (Thread-)'LocalPool'
---
--- Internal, just to not repeat code for 'takeResource' and 'tryTakeResource'
-getLocalPool :: Pool a -> IO (LocalPool a)
-getLocalPool Pool{..} = do
- i <- liftBase $ ((`mod` numStripes) . hash) <$> myThreadId
- return $ localPools V.! i
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE getLocalPool #-}
-#endif
-
--- | Destroy a resource. Note that this will ignore any exceptions in the
--- destroy function.
-destroyResource :: Pool a -> LocalPool a -> a -> IO ()
-destroyResource Pool{..} LocalPool{..} resource = do
- destroy resource `E.catch` \(_::SomeException) -> return ()
- atomically (modifyTVar_ inUse (subtract 1))
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE destroyResource #-}
-#endif
-
--- | Return a resource to the given 'LocalPool'.
-putResource :: LocalPool a -> a -> IO ()
-putResource LocalPool{..} resource = do
- now <- getCurrentTime
- atomically $ modifyTVar_ entries (Entry resource now:)
-#if __GLASGOW_HASKELL__ >= 700
-{-# INLINABLE putResource #-}
-#endif
-
--- | Destroy all resources in all stripes in the pool. Note that this
--- will ignore any exceptions in the destroy function.
---
--- This function is useful when you detect that all resources in the
--- pool are broken. For example after a database has been restarted
--- all connections opened before the restart will be broken. In that
--- case it's better to close those connections so that 'takeResource'
--- won't take a broken connection from the pool but will open a new
--- connection instead.
---
--- Another use-case for this function is that when you know you are
--- done with the pool you can destroy all idle resources immediately
--- instead of waiting on the garbage collector to destroy them, thus
--- freeing up those resources sooner.
-destroyAllResources :: Pool a -> IO ()
-destroyAllResources Pool{..} = V.forM_ localPools $ purgeLocalPool destroy
-
-modifyTVar_ :: TVar a -> (a -> a) -> STM ()
-modifyTVar_ v f = readTVar v >>= \a -> writeTVar v $! f a
-
-modError :: String -> String -> a
-modError func msg =
- error $ "Data.Pool." ++ func ++ ": " ++ msg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/README.markdown new/resource-pool-0.3.1.0/README.markdown
--- old/resource-pool-0.2.3.2/README.markdown 2014-12-16 10:01:10.000000000 +0100
+++ new/resource-pool-0.3.1.0/README.markdown 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-# Welcome to pool
-
-pool is a fast Haskell library for managing medium-lifetime pooled
-resources, such as database connections.
-
-# Join in!
-
-We are happy to receive bug reports, fixes, documentation enhancements,
-and other improvements.
-
-Please report bugs via the
-[github issue tracker](http://github.com/bos/pool/issues).
-
-Master [git repository](http://github.com/bos/pool):
-
-* `git clone git://github.com/bos/pool.git`
-
-There's also a [Mercurial mirror](http://bitbucket.org/bos/pool):
-
-* `hg clone http://bitbucket.org/bos/pool`
-
-(You can create and contribute changes using either git or Mercurial.)
-
-Authors
--------
-
-This library is written and maintained by Bryan O'Sullivan,
-<bos(a)serpentine.com>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/README.md new/resource-pool-0.3.1.0/README.md
--- old/resource-pool-0.2.3.2/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-pool-0.3.1.0/README.md 2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,10 @@
+# resource-pool
+
+[![Build Status](https://github.com/scrive/pool/workflows/Haskell-CI/badge.svg?branc…
+[![Hackage](https://img.shields.io/hackage/v/resource-pool.svg)](https://hackage.haskell.org/package/resource-pool)
+[![Dependencies](https://img.shields.io/hackage-deps/v/resource-pool.svg)](https://packdeps.haskellers.com/feed?needle=andrzej@rybczak.net)
+[![Stackage LTS](https://www.stackage.org/package/resource-pool/badge/lts)](https://www…
+[![Stackage Nightly](https://www.stackage.org/package/resource-pool/badge/nightly)](htt…
+
+A high-performance striped resource pooling implementation for Haskell based on
+[QSem](https://hackage.haskell.org/package/base/docs/Control-Concurrent-QSem.html).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/Setup.lhs new/resource-pool-0.3.1.0/Setup.lhs
--- old/resource-pool-0.2.3.2/Setup.lhs 2014-12-16 10:01:10.000000000 +0100
+++ new/resource-pool-0.3.1.0/Setup.lhs 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-#!/usr/bin/env runhaskell
-> import Distribution.Simple
-> main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/resource-pool.cabal new/resource-pool-0.3.1.0/resource-pool.cabal
--- old/resource-pool-0.2.3.2/resource-pool.cabal 2014-12-16 10:01:10.000000000 +0100
+++ new/resource-pool-0.3.1.0/resource-pool.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,55 +1,46 @@
+cabal-version: 2.4
+build-type: Simple
name: resource-pool
-version: 0.2.3.2
-synopsis: A high-performance striped resource pooling implementation
-description:
- A high-performance striped pooling abstraction for managing
- flexibly-sized collections of resources such as database
- connections.
-
-homepage: http://github.com/bos/pool
-license: BSD3
+version: 0.3.1.0
+license: BSD-3-Clause
license-file: LICENSE
-author: Bryan O'Sullivan <bos(a)serpentine.com>
-maintainer: Bryan O'Sullivan <bos(a)serpentine.com>,
- Bas van Dijk <v.dijk.bas(a)gmail.com>
-copyright: Copyright 2011 MailRank, Inc.
category: Data, Database, Network
-build-type: Simple
-extra-source-files:
- README.markdown
+maintainer: andrzej(a)rybczak.net
+author: Andrzej Rybczak, Bryan O'Sullivan
-cabal-version: >=1.8
-
-flag developer
- description: operate in developer mode
- default: False
- manual: True
+synopsis: A high-performance striped resource pooling implementation
-library
- exposed-modules:
- Data.Pool
+description: A high-performance striped pooling abstraction for managing
+ flexibly-sized collections of resources such as database
+ connections.
- build-depends:
- base >= 4.4 && < 5,
- hashable,
- monad-control >= 0.2.0.1,
- transformers,
- transformers-base >= 0.4,
- stm >= 2.3,
- time,
- vector >= 0.7
-
- if flag(developer)
- ghc-options: -Werror
- ghc-prof-options: -auto-all
- cpp-options: -DASSERTS -DDEBUG
+tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.3
- ghc-options: -Wall
+extra-doc-files:
+ CHANGELOG.md
+ README.md
+bug-reports: https://github.com/scrive/pool/issues
source-repository head
type: git
- location: http://github.com/bos/pool
+ location: https://github.com/scrive/pool.git
-source-repository head
- type: mercurial
- location: http://bitbucket.org/bos/pool
+library
+ hs-source-dirs: src
+
+ exposed-modules: Data.Pool
+ Data.Pool.Internal
+ Data.Pool.Introspection
+
+ build-depends: base >= 4.11 && < 5
+ , primitive >= 0.7
+ , time
+
+ ghc-options: -Wall -Wcompat
+
+ default-language: Haskell2010
+
+ default-extensions: DeriveGeneric
+ , LambdaCase
+ , RankNTypes
+ , TypeApplications
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/src/Data/Pool/Internal.hs new/resource-pool-0.3.1.0/src/Data/Pool/Internal.hs
--- old/resource-pool-0.2.3.2/src/Data/Pool/Internal.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-pool-0.3.1.0/src/Data/Pool/Internal.hs 2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,275 @@
+-- | Internal implementation details for "Data.Pool".
+--
+-- This module is intended for internal use only, and may change without warning
+-- in subsequent releases.
+{-# OPTIONS_HADDOCK not-home #-}
+module Data.Pool.Internal where
+
+import Control.Concurrent
+import Control.Exception
+import Control.Monad
+import Data.IORef
+import Data.Primitive.SmallArray
+import GHC.Clock
+import qualified Data.List as L
+
+-- | Striped resource pool based on "Control.Concurrent.QSem".
+--
+-- The number of stripes is arranged to be equal to the number of capabilities
+-- so that they never compete over access to the same stripe. This results in a
+-- very good performance in a multi-threaded environment.
+data Pool a = Pool
+ { poolConfig :: !(PoolConfig a)
+ , localPools :: !(SmallArray (LocalPool a))
+ , reaperRef :: !(IORef ())
+ }
+
+-- | A single, capability-local pool.
+data LocalPool a = LocalPool
+ { stripeId :: !Int
+ , stripeVar :: !(MVar (Stripe a))
+ , cleanerRef :: !(IORef ())
+ }
+
+-- | Stripe of a resource pool. If @available@ is 0, the list of threads waiting
+-- for a resource (each with an associated 'MVar') is @queue ++ reverse queueR@.
+data Stripe a = Stripe
+ { available :: !Int
+ , cache :: ![Entry a]
+ , queue :: !(Queue a)
+ , queueR :: !(Queue a)
+ }
+
+-- | An existing resource currently sitting in a pool.
+data Entry a = Entry
+ { entry :: a
+ , lastUsed :: !Double
+ }
+
+-- | A queue of MVarS corresponding to threads waiting for resources.
+--
+-- Basically a monomorphic list to save two pointer indirections.
+data Queue a = Queue !(MVar (Maybe a)) (Queue a) | Empty
+
+-- | Configuration of a 'Pool'.
+data PoolConfig a = PoolConfig
+ { createResource :: !(IO a)
+ -- ^ The action that creates a new resource.
+ , freeResource :: !(a -> IO ())
+ -- ^ The action that destroys an existing resource.
+ , poolCacheTTL :: !Double
+ -- ^ The amount of seconds for which an unused resource is kept around. The
+ -- smallest acceptable value is @0.5@.
+ --
+ -- /Note:/ the elapsed time before destroying a resource may be a little
+ -- longer than requested, as the collector thread wakes at 1-second intervals.
+ , poolMaxResources :: !Int
+ -- ^ The maximum number of resources to keep open across all stripes. The
+ -- smallest acceptable value is @1@.
+ --
+ -- /Note:/ for each stripe the number of resources is divided by the number of
+ -- capabilities and rounded up. Therefore the pool might end up creating up to
+ -- @N - 1@ resources more in total than specified, where @N@ is the number of
+ -- capabilities.
+ }
+
+-- | Create a new striped resource pool.
+--
+-- The number of stripes is equal to the number of capabilities.
+--
+-- /Note:/ although the runtime system will destroy all idle resources when the
+-- pool is garbage collected, it's recommended to manually call
+-- 'destroyAllResources' when you're done with the pool so that the resources
+-- are freed up as soon as possible.
+newPool :: PoolConfig a -> IO (Pool a)
+newPool pc = do
+ when (poolCacheTTL pc < 0.5) $ do
+ error "poolCacheTTL must be at least 0.5"
+ when (poolMaxResources pc < 1) $ do
+ error "poolMaxResources must be at least 1"
+ numStripes <- getNumCapabilities
+ when (numStripes < 1) $ do
+ error "numStripes must be at least 1"
+ pools <- fmap (smallArrayFromListN numStripes) . forM [1..numStripes] $ \n -> do
+ ref <- newIORef ()
+ stripe <- newMVar Stripe
+ { available = poolMaxResources pc `quotCeil` numStripes
+ , cache = []
+ , queue = Empty
+ , queueR = Empty
+ }
+ -- When the local pool goes out of scope, free its resources.
+ void . mkWeakIORef ref $ cleanStripe (const True) (freeResource pc) stripe
+ pure LocalPool { stripeId = n
+ , stripeVar = stripe
+ , cleanerRef = ref
+ }
+ mask_ $ do
+ ref <- newIORef ()
+ collectorA <- forkIOWithUnmask $ \unmask -> unmask $ collector pools
+ void . mkWeakIORef ref $ do
+ -- When the pool goes out of scope, stop the collector. Resources existing
+ -- in stripes will be taken care by their cleaners.
+ killThread collectorA
+ pure Pool { poolConfig = pc
+ , localPools = pools
+ , reaperRef = ref
+ }
+ where
+ quotCeil :: Int -> Int -> Int
+ quotCeil x y =
+ -- Basically ceiling (x / y) without going through Double.
+ let (z, r) = x `quotRem` y in if r == 0 then z else z + 1
+
+ -- Collect stale resources from the pool once per second.
+ collector pools = forever $ do
+ threadDelay 1000000
+ now <- getMonotonicTime
+ let isStale e = now - lastUsed e > poolCacheTTL pc
+ mapM_ (cleanStripe isStale (freeResource pc) . stripeVar) pools
+
+-- | Destroy a resource.
+--
+-- Note that this will ignore any exceptions in the destroy function.
+destroyResource :: Pool a -> LocalPool a -> a -> IO ()
+destroyResource pool lp a = do
+ uninterruptibleMask_ $ do -- Note [signal uninterruptible]
+ stripe <- takeMVar (stripeVar lp)
+ newStripe <- signal stripe Nothing
+ putMVar (stripeVar lp) newStripe
+ void . try @SomeException $ freeResource (poolConfig pool) a
+
+-- | Return a resource to the given 'LocalPool'.
+putResource :: LocalPool a -> a -> IO ()
+putResource lp a = do
+ uninterruptibleMask_ $ do -- Note [signal uninterruptible]
+ stripe <- takeMVar (stripeVar lp)
+ newStripe <- signal stripe (Just a)
+ putMVar (stripeVar lp) newStripe
+
+-- | Destroy all resources in all stripes in the pool.
+--
+-- Note that this will ignore any exceptions in the destroy function.
+--
+-- This function is useful when you detect that all resources in the pool are
+-- broken. For example after a database has been restarted all connections
+-- opened before the restart will be broken. In that case it's better to close
+-- those connections so that 'takeResource' won't take a broken connection from
+-- the pool but will open a new connection instead.
+--
+-- Another use-case for this function is that when you know you are done with
+-- the pool you can destroy all idle resources immediately instead of waiting on
+-- the garbage collector to destroy them, thus freeing up those resources
+-- sooner.
+destroyAllResources :: Pool a -> IO ()
+destroyAllResources pool = forM_ (localPools pool) $ \lp -> do
+ cleanStripe (const True) (freeResource (poolConfig pool)) (stripeVar lp)
+
+----------------------------------------
+-- Helpers
+
+-- | Get a capability-local pool.
+getLocalPool :: SmallArray (LocalPool a) -> IO (LocalPool a)
+getLocalPool pools = do
+ (cid, _) <- threadCapability =<< myThreadId
+ pure $ pools `indexSmallArray` (cid `rem` sizeofSmallArray pools)
+
+-- | Wait for the resource to be put into a given 'MVar'.
+waitForResource :: MVar (Stripe a) -> MVar (Maybe a) -> IO (Maybe a)
+waitForResource mstripe q = takeMVar q `onException` cleanup
+ where
+ cleanup = uninterruptibleMask_ $ do -- Note [signal uninterruptible]
+ stripe <- takeMVar mstripe
+ newStripe <- tryTakeMVar q >>= \case
+ Just ma -> do
+ -- Between entering the exception handler and taking ownership of
+ -- the stripe we got the resource we wanted. We don't need it
+ -- anymore though, so pass it to someone else.
+ signal stripe ma
+ Nothing -> do
+ -- If we're still waiting, fill up the MVar with an undefined value
+ -- so that 'signal' can discard our MVar from the queue.
+ putMVar q $ error "unreachable"
+ pure stripe
+ putMVar mstripe newStripe
+
+-- | If an exception is received while a resource is being created, restore the
+-- original size of the stripe.
+restoreSize :: MVar (Stripe a) -> IO ()
+restoreSize mstripe = uninterruptibleMask_ $ do
+ -- 'uninterruptibleMask_' is used since 'takeMVar' might block.
+ stripe <- takeMVar mstripe
+ putMVar mstripe $! stripe { available = available stripe + 1 }
+
+-- | Free resource entries in the stripes that fulfil a given condition.
+cleanStripe
+ :: (Entry a -> Bool)
+ -> (a -> IO ())
+ -> MVar (Stripe a)
+ -> IO ()
+cleanStripe isStale free mstripe = mask $ \unmask -> do
+ -- Asynchronous exceptions need to be masked here to prevent leaking of
+ -- 'stale' resources before they're freed.
+ stale <- modifyMVar mstripe $ \stripe -> unmask $ do
+ let (stale, fresh) = L.partition isStale (cache stripe)
+ -- There's no need to update 'available' here because it only tracks
+ -- the number of resources taken from the pool.
+ newStripe = stripe { cache = fresh }
+ newStripe `seq` pure (newStripe, map entry stale)
+ -- We need to ignore exceptions in the 'free' function, otherwise if an
+ -- exception is thrown half-way, we leak the rest of the resources. Also,
+ -- asynchronous exceptions need to be hard masked here since freeing a
+ -- resource might in theory block.
+ uninterruptibleMask_ . forM_ stale $ try @SomeException . free
+
+-- Note [signal uninterruptible]
+--
+-- If we have
+--
+-- bracket takeResource putResource (...)
+--
+-- and an exception arrives at the putResource, then we must not lose the
+-- resource. The putResource is masked by bracket, but taking the MVar might
+-- block, and so it would be interruptible. Hence we need an uninterruptible
+-- variant of mask here.
+signal :: Stripe a -> Maybe a -> IO (Stripe a)
+signal stripe ma = if available stripe == 0
+ then loop (queue stripe) (queueR stripe)
+ else do
+ newCache <- case ma of
+ Just a -> do
+ now <- getMonotonicTime
+ pure $ Entry a now : cache stripe
+ Nothing -> pure $ cache stripe
+ pure $! stripe { available = available stripe + 1
+ , cache = newCache
+ }
+ where
+ loop Empty Empty = do
+ newCache <- case ma of
+ Just a -> do
+ now <- getMonotonicTime
+ pure [Entry a now]
+ Nothing -> pure []
+ pure $! Stripe { available = 1
+ , cache = newCache
+ , queue = Empty
+ , queueR = Empty
+ }
+ loop Empty qR = loop (reverseQueue qR) Empty
+ loop (Queue q qs) qR = tryPutMVar q ma >>= \case
+ -- This fails when 'waitForResource' went into the exception handler and
+ -- filled the MVar (with an undefined value) itself. In such case we
+ -- simply ignore it.
+ False -> loop qs qR
+ True -> pure $! stripe { available = 0
+ , queue = qs
+ , queueR = qR
+ }
+
+reverseQueue :: Queue a -> Queue a
+reverseQueue = go Empty
+ where
+ go acc = \case
+ Empty -> acc
+ Queue x xs -> go (Queue x acc) xs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/src/Data/Pool/Introspection.hs new/resource-pool-0.3.1.0/src/Data/Pool/Introspection.hs
--- old/resource-pool-0.2.3.2/src/Data/Pool/Introspection.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-pool-0.3.1.0/src/Data/Pool/Introspection.hs 2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,151 @@
+-- | A variant of "Data.Pool" with introspection capabilities.
+module Data.Pool.Introspection
+ ( -- * Pool
+ PoolConfig(..)
+ , Pool
+ , LocalPool
+ , newPool
+
+ -- * Resource management
+ , Resource(..)
+ , Acquisition(..)
+ , withResource
+ , takeResource
+ , tryWithResource
+ , tryTakeResource
+ , putResource
+ , destroyResource
+ , destroyAllResources
+ ) where
+
+import Control.Concurrent
+import Control.Exception
+import GHC.Clock
+import GHC.Generics (Generic)
+
+import Data.Pool.Internal
+
+-- | A resource taken from the pool along with additional information.
+data Resource a = Resource
+ { resource :: a
+ , stripeNumber :: !Int
+ , availableResources :: !Int
+ , acquisition :: !Acquisition
+ , acquisitionTime :: !Double
+ , creationTime :: !(Maybe Double)
+ } deriving (Eq, Show, Generic)
+
+-- | Describes how a resource was acquired from the pool.
+data Acquisition
+ = Immediate
+ -- ^ A resource was taken from the pool immediately.
+ | Delayed
+ -- ^ The thread had to wait until a resource was released.
+ deriving (Eq, Show, Generic)
+
+-- | 'Data.Pool.withResource' with introspection capabilities.
+withResource :: Pool a -> (Resource a -> IO r) -> IO r
+withResource pool act = mask $ \unmask -> do
+ (res, localPool) <- takeResource pool
+ r <- unmask (act res) `onException` destroyResource pool localPool (resource res)
+ putResource localPool (resource res)
+ pure r
+
+-- | 'Data.Pool.takeResource' with introspection capabilities.
+takeResource :: Pool a -> IO (Resource a, LocalPool a)
+takeResource pool = mask_ $ do
+ t1 <- getMonotonicTime
+ lp <- getLocalPool (localPools pool)
+ stripe <- takeMVar (stripeVar lp)
+ if available stripe == 0
+ then do
+ q <- newEmptyMVar
+ putMVar (stripeVar lp) $! stripe { queueR = Queue q (queueR stripe) }
+ waitForResource (stripeVar lp) q >>= \case
+ Just a -> do
+ t2 <- getMonotonicTime
+ let res = Resource
+ { resource = a
+ , stripeNumber = stripeId lp
+ , availableResources = 0
+ , acquisition = Delayed
+ , acquisitionTime = t2 - t1
+ , creationTime = Nothing
+ }
+ pure (res, lp)
+ Nothing -> do
+ t2 <- getMonotonicTime
+ a <- createResource (poolConfig pool) `onException` restoreSize (stripeVar lp)
+ t3 <- getMonotonicTime
+ let res = Resource
+ { resource = a
+ , stripeNumber = stripeId lp
+ , availableResources = 0
+ , acquisition = Delayed
+ , acquisitionTime = t2 - t1
+ , creationTime = Just $! t3 - t2
+ }
+ pure (res, lp)
+ else takeAvailableResource pool t1 lp stripe
+
+-- | A variant of 'withResource' that doesn't execute the action and returns
+-- 'Nothing' instead of blocking if the capability-local pool is exhausted.
+tryWithResource :: Pool a -> (Resource a -> IO r) -> IO (Maybe r)
+tryWithResource pool act = mask $ \unmask -> tryTakeResource pool >>= \case
+ Just (res, localPool) -> do
+ r <- unmask (act res) `onException` destroyResource pool localPool (resource res)
+ putResource localPool (resource res)
+ pure (Just r)
+ Nothing -> pure Nothing
+
+-- | A variant of 'takeResource' that returns 'Nothing' instead of blocking if
+-- the capability-local pool is exhausted.
+tryTakeResource :: Pool a -> IO (Maybe (Resource a, LocalPool a))
+tryTakeResource pool = mask_ $ do
+ t1 <- getMonotonicTime
+ lp <- getLocalPool (localPools pool)
+ stripe <- takeMVar (stripeVar lp)
+ if available stripe == 0
+ then do
+ putMVar (stripeVar lp) stripe
+ pure Nothing
+ else Just <$> takeAvailableResource pool t1 lp stripe
+
+----------------------------------------
+-- Helpers
+
+takeAvailableResource
+ :: Pool a
+ -> Double
+ -> LocalPool a
+ -> Stripe a
+ -> IO (Resource a, LocalPool a)
+takeAvailableResource pool t1 lp stripe = case cache stripe of
+ [] -> do
+ let newAvailable = available stripe - 1
+ putMVar (stripeVar lp) $! stripe { available = newAvailable }
+ t2 <- getMonotonicTime
+ a <- createResource (poolConfig pool) `onException` restoreSize (stripeVar lp)
+ t3 <- getMonotonicTime
+ let res = Resource
+ { resource = a
+ , stripeNumber = stripeId lp
+ , availableResources = newAvailable
+ , acquisition = Immediate
+ , acquisitionTime = t2 - t1
+ , creationTime = Just $! t3 - t2
+ }
+ pure (res, lp)
+ Entry a _ : as -> do
+ let newAvailable = available stripe - 1
+ putMVar (stripeVar lp) $! stripe { available = newAvailable, cache = as }
+ t2 <- getMonotonicTime
+ let res = Resource
+ { resource = a
+ , stripeNumber = stripeId lp
+ , availableResources = newAvailable
+ , acquisition = Immediate
+ , acquisitionTime = t2 - t1
+ , creationTime = Nothing
+ }
+ pure (res, lp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-pool-0.2.3.2/src/Data/Pool.hs new/resource-pool-0.3.1.0/src/Data/Pool.hs
--- old/resource-pool-0.2.3.2/src/Data/Pool.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/resource-pool-0.3.1.0/src/Data/Pool.hs 2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,126 @@
+-- | A high-performance pooling abstraction for managing flexibly-sized
+-- collections of resources such as database connections.
+module Data.Pool
+ ( -- * Pool
+ PoolConfig(..)
+ , Pool
+ , LocalPool
+ , newPool
+
+ -- * Resource management
+ , withResource
+ , takeResource
+ , tryWithResource
+ , tryTakeResource
+ , putResource
+ , destroyResource
+ , destroyAllResources
+
+ -- * Compatibility with 0.2
+ , createPool
+ ) where
+
+import Control.Concurrent
+import Control.Exception
+import Data.Time (NominalDiffTime)
+
+import Data.Pool.Internal
+
+-- | Take a resource from the pool, perform an action with it and return it to
+-- the pool afterwards.
+--
+-- * If the pool has an idle resource available, it is used immediately.
+--
+-- * Otherwise, if the maximum number of resources has not yet been reached, a
+-- new resource is created and used.
+--
+-- * If the maximum number of resources has been reached, this function blocks
+-- until a resource becomes available.
+--
+-- If the action throws an exception of any type, the resource is destroyed and
+-- not returned to the pool.
+--
+-- It probably goes without saying that you should never manually destroy a
+-- pooled resource, as doing so will almost certainly cause a subsequent user
+-- (who expects the resource to be valid) to throw an exception.
+withResource :: Pool a -> (a -> IO r) -> IO r
+withResource pool act = mask $ \unmask -> do
+ (res, localPool) <- takeResource pool
+ r <- unmask (act res) `onException` destroyResource pool localPool res
+ putResource localPool res
+ pure r
+
+-- | Take a resource from the pool, following the same results as
+-- 'withResource'.
+--
+-- /Note:/ this function returns both a resource and the 'LocalPool' it came
+-- from so that it may either be destroyed (via 'destroyResource') or returned
+-- to the pool (via 'putResource').
+takeResource :: Pool a -> IO (a, LocalPool a)
+takeResource pool = mask_ $ do
+ lp <- getLocalPool (localPools pool)
+ stripe <- takeMVar (stripeVar lp)
+ if available stripe == 0
+ then do
+ q <- newEmptyMVar
+ putMVar (stripeVar lp) $! stripe { queueR = Queue q (queueR stripe) }
+ waitForResource (stripeVar lp) q >>= \case
+ Just a -> pure (a, lp)
+ Nothing -> do
+ a <- createResource (poolConfig pool) `onException` restoreSize (stripeVar lp)
+ pure (a, lp)
+ else takeAvailableResource pool lp stripe
+
+-- | A variant of 'withResource' that doesn't execute the action and returns
+-- 'Nothing' instead of blocking if the capability-local pool is exhausted.
+tryWithResource :: Pool a -> (a -> IO r) -> IO (Maybe r)
+tryWithResource pool act = mask $ \unmask -> tryTakeResource pool >>= \case
+ Just (res, localPool) -> do
+ r <- unmask (act res) `onException` destroyResource pool localPool res
+ putResource localPool res
+ pure (Just r)
+ Nothing -> pure Nothing
+
+-- | A variant of 'takeResource' that returns 'Nothing' instead of blocking if
+-- the capability-local pool is exhausted.
+tryTakeResource :: Pool a -> IO (Maybe (a, LocalPool a))
+tryTakeResource pool = mask_ $ do
+ lp <- getLocalPool (localPools pool)
+ stripe <- takeMVar (stripeVar lp)
+ if available stripe == 0
+ then do
+ putMVar (stripeVar lp) stripe
+ pure Nothing
+ else Just <$> takeAvailableResource pool lp stripe
+
+{-# DEPRECATED createPool "Use newPool instead" #-}
+-- | Provided for compatibility with @resource-pool < 0.3@.
+--
+-- Use 'newPool' instead.
+createPool :: IO a -> (a -> IO ()) -> Int -> NominalDiffTime -> Int -> IO (Pool a)
+createPool create free numStripes idleTime maxResources = newPool PoolConfig
+ { createResource = create
+ , freeResource = free
+ , poolCacheTTL = realToFrac idleTime
+ , poolMaxResources = numStripes * maxResources
+ }
+
+----------------------------------------
+-- Helpers
+
+takeAvailableResource
+ :: Pool a
+ -> LocalPool a
+ -> Stripe a
+ -> IO (a, LocalPool a)
+takeAvailableResource pool lp stripe = case cache stripe of
+ [] -> do
+ putMVar (stripeVar lp) $! stripe { available = available stripe - 1 }
+ a <- createResource (poolConfig pool) `onException` restoreSize (stripeVar lp)
+ pure (a, lp)
+ Entry a _ : as -> do
+ putMVar (stripeVar lp) $! stripe
+ { available = available stripe - 1
+ , cache = as
+ }
+ pure (a, lp)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-repline for openSUSE:Factory checked in at 2022-08-01 21:30:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-repline (Old)
and /work/SRC/openSUSE:Factory/.ghc-repline.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-repline"
Mon Aug 1 21:30:23 2022 rev:4 rq:987082 version:0.4.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-repline/ghc-repline.changes 2020-12-22 11:45:26.925813725 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-repline.new.1533/ghc-repline.changes 2022-08-01 21:30:43.873713661 +0200
@@ -1,0 +2,16 @@
+Fri May 20 03:16:42 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update repline to version 0.4.2.0.
+ 0.4.2.0
+ =======
+
+ - Add support for ghc 9.0, 9.2
+ - CI: Drop Travis and use Github Actions instead
+
+ 0.4.1.0
+ =======
+
+ - Fix up documentation.
+ - Export `MonadHaskeline` from System.Control.Repline.
+
+-------------------------------------------------------------------
Old:
----
repline-0.4.0.0.tar.gz
New:
----
repline-0.4.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-repline.spec ++++++
--- /var/tmp/diff_new_pack.yPaQiw/_old 2022-08-01 21:30:44.389715142 +0200
+++ /var/tmp/diff_new_pack.yPaQiw/_new 2022-08-01 21:30:44.393715153 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-repline
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# 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 repline
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.4.0.0
+Version: 0.4.2.0
Release: 0
Summary: Haskeline wrapper for GHCi-like REPL interfaces
License: MIT
++++++ repline-0.4.0.0.tar.gz -> repline-0.4.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/ChangeLog.md new/repline-0.4.2.0/ChangeLog.md
--- old/repline-0.4.0.0/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,18 @@
HEAD
====
+0.4.2.0
+=======
+
+- Add support for ghc 9.0, 9.2
+- CI: Drop Travis and use Github Actions instead
+
+0.4.1.0
+=======
+
+- Fix up documentation.
+- Export `MonadHaskeline` from System.Control.Repline.
+
0.4.0.0
=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/README.md new/repline-0.4.2.0/README.md
--- old/repline-0.4.0.0/README.md 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/README.md 2001-09-09 03:46:40.000000000 +0200
@@ -1,7 +1,7 @@
Repline
-------
-[![Build Status](https://travis-ci.org/sdiehl/repline.svg)](https://travis-ci.org/sd…
+[![Build Status](https://travis-ci.org/sdiehl/repline.svg?branch=master)](https://tr…
[![Hackage](https://img.shields.io/hackage/v/repline.svg)](https://hackage.haskell.org/package/repline)
Slightly higher level wrapper for creating GHCi-like REPL monads that are composable with normal MTL
@@ -9,7 +9,7 @@
over and decided to canonize the giant pile of hacks that I use to make Haskeline work.
See
-[Documentation](https://hackage.haskell.org/package/repline-0.2.2.0/docs/System-Console-Repline.html)
+[Documentation](https://hackage.haskell.org/package/repline-0.4.0.0/docs/System-Console-Repline.html)
for more detailed usage.
Examples
@@ -18,7 +18,7 @@
* [Simple](examples/Simple.hs)
* [Prefix](examples/Prefix.hs)
* [Stateful](examples/Stateful.hs)
-* [Multiline](examples/MultiLine.hs)
+* [Multiline](examples/Multiline.hs)
Migration from 0.3.x
--------------------
@@ -57,7 +57,7 @@
customBanner MultiLine = pure "| "
```
-See [Multiline](examples/MultiLine.hs) for a complete example.
+See [Multiline](examples/Multiline.hs) for a complete example.
Migration from 0.2.x
--------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/examples/Multiline.hs new/repline-0.4.2.0/examples/Multiline.hs
--- old/repline-0.4.0.0/examples/Multiline.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/examples/Multiline.hs 2001-09-09 03:46:40.000000000 +0200
@@ -2,6 +2,7 @@
import Control.Monad.Trans
import Data.List (isPrefixOf)
+import Data.Monoid
import System.Console.Repline
import System.Process (callCommand)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/examples/Prefix.hs new/repline-0.4.2.0/examples/Prefix.hs
--- old/repline-0.4.0.0/examples/Prefix.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/examples/Prefix.hs 2001-09-09 03:46:40.000000000 +0200
@@ -4,6 +4,7 @@
module Main (main, repl) where
+import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.State.Strict
import Data.List (isPrefixOf)
import qualified Data.Set as Set
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/examples/Stateful.hs new/repline-0.4.2.0/examples/Stateful.hs
--- old/repline-0.4.0.0/examples/Stateful.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/examples/Stateful.hs 2001-09-09 03:46:40.000000000 +0200
@@ -4,6 +4,7 @@
module Main (main, repl) where
+import Control.Monad.IO.Class (liftIO)
import Control.Monad.State.Strict
import Data.List (isPrefixOf)
import Data.Monoid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/repline.cabal new/repline-0.4.2.0/repline.cabal
--- old/repline-0.4.0.0/repline.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/repline.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,32 +1,27 @@
name: repline
-version: 0.4.0.0
+version: 0.4.2.0
synopsis: Haskeline wrapper for GHCi-like REPL interfaces.
license: MIT
license-file: LICENSE
author: Stephen Diehl
maintainer: stephen.m.diehl(a)gmail.com
-copyright: 2014-2020 Stephen Diehl
+copyright: 2014-2022 Stephen Diehl
category: User Interfaces
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
tested-with:
- GHC ==7.6.1
- || ==7.6.2
- || ==7.6.3
- || ==7.8.1
- || ==7.8.2
- || ==7.8.3
- || ==7.8.4
- || ==7.10.1
- || ==7.10.2
- || ==7.10.3
- || ==8.0.1
- || ==8.2.1
- || ==8.4.1
- || ==8.6.1
+ GHC ==8.2.2
+ || ==8.4.4
+ || ==8.6.2
+ || ==8.6.3
+ || ==8.6.4
+ || ==8.6.5
|| ==8.8.1
|| ==8.10.1
+ || ==8.10.7
+ || ==9.0.1
+ || ==9.2
homepage: https://github.com/sdiehl/repline
bug-reports: https://github.com/sdiehl/repline/issues
@@ -50,7 +45,7 @@
, containers >=0.5 && <0.7
, exceptions >=0.10 && <0.11
, haskeline >=0.8 && <0.9
- , mtl >=2.2 && <2.3
+ , mtl >=2.2 && <2.4
, process >=1.2 && <2.0
if !impl(ghc >=8.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/repline-0.4.0.0/src/System/Console/Repline.hs new/repline-0.4.2.0/src/System/Console/Repline.hs
--- old/repline-0.4.0.0/src/System/Console/Repline.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/repline-0.4.2.0/src/System/Console/Repline.hs 2001-09-09 03:46:40.000000000 +0200
@@ -58,17 +58,21 @@
-- > help :: [String] -> Repl ()
-- > help args = liftIO $ print $ "Help: " ++ show args
-- >
--- > say :: [String] -> Repl ()
--- > say args = do
--- > _ <- liftIO $ system $ "cowsay" ++ " " ++ (unwords args)
+-- > say :: String -> Repl ()
+-- > say arg = do
+-- > _ <- liftIO $ callCommand $ "cowsay" ++ " " ++ arg
-- > return ()
--
+-- (You may need the following import in pull `callCommand` into scope)
+--
+-- > import System.Process (callCommand)
+--
-- Now we need only map these functions to their commands.
--
--- > options :: [(String, [String] -> Repl ())]
+-- > options :: Options (HaskelineT IO)
-- > options = [
--- > ("help", help) -- :help
--- > , ("say", say) -- :say
+-- > ("help", help . words) -- :help
+-- > , ("say", say) -- :say
-- > ]
--
-- The initialiser function is simply an IO action that is called at the start of the shell.
@@ -78,15 +82,16 @@
--
-- The finaliser function is an IO action that is called at the end of the shell.
--
--- final :: Repl ExitDecision
--- final = do
--- liftIO $ putStrLn "Goodbye!"
--- return Exit
+-- > final :: Repl ExitDecision
+-- > final = do
+-- > liftIO $ putStrLn "Goodbye!"
+-- > return Exit
--
-- Putting it all together we have a little shell.
--
-- > main :: IO ()
--- > main = evalRepl (pure ">>> ") cmd options (Just ':') (Word completer) ini
+-- > main = evalRepl (const . pure $ ">>> ") cmd options (Just ':') (Just "paste") (Word completer) ini final
+
--
-- Alternatively instead of initialising the repl from position arguments you
-- can pass the 'ReplOpts' record with explicitly named arguments.
@@ -131,6 +136,7 @@
( -- * Repline Monad
HaskelineT,
runHaskelineT,
+ MonadHaskeline,
-- * Toplevel
evalRepl,
@@ -166,6 +172,8 @@
import Control.Monad.Catch
import Control.Monad.Fail as Fail
+import Control.Monad.Fix (MonadFix)
+import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Reader
import Control.Monad.State.Strict
import Data.List (isPrefixOf)
@@ -270,20 +278,14 @@
-- | Completion loop.
replLoop ::
- (Functor m, MonadMask m, MonadIO m) =>
- -- | Banner function
- (MultiLine -> HaskelineT m String) ->
- -- | Command function
- Command (HaskelineT m) ->
- -- | options function
- Options (HaskelineT m) ->
- -- | options prefix
- Maybe Char ->
- -- | multi-line command
- Maybe String ->
- -- | Finaliser ( runs on <Ctrl-D> )
- HaskelineT m ExitDecision ->
- HaskelineT m ()
+ (Functor m, MonadMask m, MonadIO m)
+ => (MultiLine -> HaskelineT m String) -- ^ Banner function
+ -> Command (HaskelineT m) -- ^ Command function
+ -> Options (HaskelineT m) -- ^ options function
+ -> Maybe Char -- ^ options prefix
+ -> Maybe String -- ^ multi-line command
+ -> HaskelineT m ExitDecision -- ^ Finaliser ( runs on <Ctrl-D> )
+ -> HaskelineT m ()
replLoop banner cmdM opts optsPrefix multiCommand finalz = loop
where
loop = do
@@ -382,24 +384,16 @@
-- | Evaluate the REPL logic into a MonadCatch context.
evalRepl ::
- (MonadMask m, MonadIO m) =>
- -- | Banner
- (MultiLine -> HaskelineT m String) ->
- -- | Command function
- Command (HaskelineT m) ->
- -- | Options list and commands
- Options (HaskelineT m) ->
- -- | Optional command prefix ( passing Nothing ignores the Options argument )
- Maybe Char ->
- -- | Optional multi-line command ( passing Nothing disables multi-line support )
- Maybe String ->
- -- | Tab completion function
- CompleterStyle m ->
- -- | Initialiser
- HaskelineT m a ->
- -- | Finaliser ( runs on Ctrl-D )
- HaskelineT m ExitDecision ->
- m ()
+ (MonadMask m, MonadIO m)
+ => (MultiLine -> HaskelineT m String) -- ^ Banner
+ -> Command (HaskelineT m) -- ^ Command function
+ -> Options (HaskelineT m) -- ^ Options list and commands
+ -> Maybe Char -- ^ Optional command prefix ( passing Nothing ignores the Options argument )
+ -> Maybe String -- ^ Optional multi-line command ( passing Nothing disables multi-line support )
+ -> CompleterStyle m -- ^ Tab completion function
+ -> HaskelineT m a -- ^ Initialiser
+ -> HaskelineT m ExitDecision -- ^ Finaliser ( runs on Ctrl-D )
+ -> m ()
evalRepl banner cmd opts optsPrefix multiCommand comp initz finalz = runHaskelineT _readline (initz >> monad)
where
monad = replLoop banner cmd opts optsPrefix multiCommand finalz
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-regex-posix for openSUSE:Factory checked in at 2022-08-01 21:30:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-regex-posix (Old)
and /work/SRC/openSUSE:Factory/.ghc-regex-posix.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-regex-posix"
Mon Aug 1 21:30:22 2022 rev:12 rq:987080 version:0.96.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-regex-posix/ghc-regex-posix.changes 2021-08-25 20:58:05.677170140 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-regex-posix.new.1533/ghc-regex-posix.changes 2022-08-01 21:30:42.985711113 +0200
@@ -1,0 +2,6 @@
+Wed May 25 21:07:15 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update regex-posix to version 0.96.0.1 revision 1.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
New:
----
regex-posix.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-regex-posix.spec ++++++
--- /var/tmp/diff_new_pack.KctWPp/_old 2022-08-01 21:30:43.649713018 +0200
+++ /var/tmp/diff_new_pack.KctWPp/_new 2022-08-01 21:30:43.653713030 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-regex-posix
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-bytestring-devel
@@ -56,6 +57,7 @@
%prep
%autosetup -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ regex-posix.cabal ++++++
cabal-version: 1.12
name: regex-posix
version: 0.96.0.1
x-revision: 1
build-type: Simple
license: BSD3
license-file: LICENSE
copyright: Copyright (c) 2007-2010, Christopher Kuklewicz
author: Christopher Kuklewicz
maintainer: Andreas Abel
bug-reports: https://github.com/haskell-hvr/regex-posix
synopsis: POSIX Backend for "Text.Regex" (regex-base)
category: Text
description:
The POSIX regex backend for <//hackage.haskell.org/package/regex-base regex-base>.
.
The main appeal of this backend is that it's very lightweight due to its reliance on the ubiquitous <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html POSIX.2 regex> facility that is provided by the standard C library on most POSIX platforms.
.
See also <https://wiki.haskell.org/Regular_expressions> for more information.
extra-source-files:
ChangeLog.md
cbits/myfree.h
tested-with:
GHC == 9.4.1
GHC == 9.2.2
GHC == 9.0.2
GHC == 8.10.7
GHC == 8.8.4
GHC == 8.6.5
GHC == 8.4.4
GHC == 8.2.2
GHC == 8.0.2
GHC == 7.10.3
GHC == 7.8.4
GHC == 7.6.3
GHC == 7.4.2
GHC == 7.2.2
GHC == 7.0.4
source-repository head
type: git
location: https://github.com/hvr/regex-posix.git
source-repository this
type: git
location: https://github.com/hvr/regex-base.git
tag: v0.96.0.1-r1
flag _regex-posix-clib
manual: False
default: False
description: Use <//hackage.haskell.org/package/regex-posix-clib regex-posix-clib> package (used by default on Windows)
library
hs-source-dirs: src
exposed-modules:
Text.Regex.Posix
Text.Regex.Posix.Wrap
Text.Regex.Posix.String
Text.Regex.Posix.Sequence
Text.Regex.Posix.ByteString
Text.Regex.Posix.ByteString.Lazy
other-modules:
Paths_regex_posix
c-sources: cbits/myfree.c
include-dirs: cbits
if flag(_regex-posix-clib) || os(windows)
build-depends: regex-posix-clib == 2.7.*
-- Otherwise, use POSIX.2 regex implementation from @libc@.
-- However, Windows/msys2 doesn't provide a POSIX.2 regex impl in its @libc@.
default-language: Haskell2010
default-extensions:
MultiParamTypeClasses
FunctionalDependencies
ForeignFunctionInterface
GeneralizedNewtypeDeriving
FlexibleContexts
TypeSynonymInstances
-- ^ for ghc 7.0, subsumed under FlexibleInstances later
FlexibleInstances
build-depends: regex-base == 0.94.*
, base >= 4.3 && < 5
, containers >= 0.4 && < 0.7
, bytestring >= 0.9 && < 0.12
, array >= 0.3 && < 0.6
if impl(ghc < 8)
build-depends: fail == 4.9.*
-- Warnings
ghc-options:
-Wall
-fno-warn-unused-imports
if impl(ghc >= 8)
ghc-options:
-Wcompat
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-regex-compat for openSUSE:Factory checked in at 2022-08-01 21:30:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-regex-compat (Old)
and /work/SRC/openSUSE:Factory/.ghc-regex-compat.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-regex-compat"
Mon Aug 1 21:30:21 2022 rev:12 rq:987079 version:0.95.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-regex-compat/ghc-regex-compat.changes 2021-08-25 20:58:48.793113535 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-regex-compat.new.1533/ghc-regex-compat.changes 2022-08-01 21:30:42.077708508 +0200
@@ -1,0 +2,6 @@
+Wed May 25 21:25:21 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update regex-compat to version 0.95.2.1 revision 2.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-regex-compat.spec ++++++
--- /var/tmp/diff_new_pack.WDyqPK/_old 2022-08-01 21:30:42.737710402 +0200
+++ /var/tmp/diff_new_pack.WDyqPK/_new 2022-08-01 21:30:42.745710425 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-regex-compat
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-regex-base-devel
++++++ regex-compat.cabal ++++++
--- /var/tmp/diff_new_pack.WDyqPK/_old 2022-08-01 21:30:42.797710574 +0200
+++ /var/tmp/diff_new_pack.WDyqPK/_new 2022-08-01 21:30:42.797710574 +0200
@@ -1,18 +1,16 @@
cabal-version: 1.12
name: regex-compat
version: 0.95.2.1
-x-revision: 1
+x-revision: 2
build-type: Simple
license: BSD3
license-file: LICENSE
copyright: Copyright (c) 2006, Christopher Kuklewicz
author: Christopher Kuklewicz
-maintainer:
- Herbert Valerio Riedel <hvr(a)gnu.org>,
- Andreas Abel
+maintainer: Andreas Abel
homepage: https://wiki.haskell.org/Regular_expressions
-bug-reports: https://github.com/hvr/regex-compat/issues
+bug-reports: https://github.com/haskell-hvr/regex-compat/issues
synopsis: Replaces/enhances "Text.Regex"
category: Text
description:
@@ -24,36 +22,35 @@
ChangeLog.md
tested-with:
- -- Haskell CI:
- GHC == 7.0.4
- GHC == 7.2.2
- GHC == 7.4.2
- GHC == 7.6.3
- GHC == 7.8.4
- GHC == 7.10.3
- GHC == 8.0.2
- GHC == 8.2.2
- GHC == 8.4.4
- GHC == 8.6.5
+ GHC == 9.4.1
+ GHC == 9.2.2
+ GHC == 9.0.2
+ GHC == 8.10.7
GHC == 8.8.4
- GHC == 8.10.4
- GHC == 9.0.1
- -- manually (AA, 2021-08-12):
- -- GHC == 9.2.1 -- RC 1
+ GHC == 8.6.5
+ GHC == 8.4.4
+ GHC == 8.2.2
+ GHC == 8.0.2
+ GHC == 7.10.3
+ GHC == 7.8.4
+ GHC == 7.6.3
+ GHC == 7.4.2
+ GHC == 7.2.2
+ GHC == 7.0.4
source-repository head
type: git
- location: https://github.com/hvr/regex-compat.git
+ location: https://github.com/haskell-hvr/regex-compat.git
source-repository this
type: git
- location: https://github.com/hvr/regex-compat.git
- tag: v0.95.2.1
+ location: https://github.com/haskell-hvr/regex-compat.git
+ tag: v0.95.2.1-r2
library
exposed-modules: Text.Regex
- build-depends: base >= 4.3 && < 4.17
+ build-depends: base >= 4.3 && < 5
, regex-base == 0.94.*
, regex-posix == 0.96.*
, array >= 0.3 && < 0.6
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-regex-base for openSUSE:Factory checked in at 2022-08-01 21:30:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-regex-base (Old)
and /work/SRC/openSUSE:Factory/.ghc-regex-base.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-regex-base"
Mon Aug 1 21:30:21 2022 rev:23 rq:987078 version:0.94.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-regex-base/ghc-regex-base.changes 2021-12-19 17:34:48.816280876 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-regex-base.new.1533/ghc-regex-base.changes 2022-08-01 21:30:40.265703310 +0200
@@ -1,0 +2,6 @@
+Wed May 25 20:34:28 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update regex-base to version 0.94.0.2 revision 1.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
New:
----
regex-base.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-regex-base.spec ++++++
--- /var/tmp/diff_new_pack.5Mv79W/_old 2022-08-01 21:30:41.753707579 +0200
+++ /var/tmp/diff_new_pack.5Mv79W/_new 2022-08-01 21:30:41.757707590 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-regex-base
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-bytestring-devel
@@ -61,6 +62,7 @@
%prep
%autosetup -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ regex-base.cabal ++++++
cabal-version: 1.12
name: regex-base
version: 0.94.0.2
x-revision: 1
build-type: Simple
license: BSD3
license-file: LICENSE
copyright: Copyright (c) 2006, Christopher Kuklewicz
author: Christopher Kuklewicz
maintainer: Andreas Abel
homepage: https://wiki.haskell.org/Regular_expressions
bug-reports: https://github.com/haskell-hvr/regex-base/issues
synopsis: Common "Text.Regex.*" API for Regex matching
category: Text
description:
This package does not provide the ability to do regular expression matching.
Instead, it provides the type classes that constitute the abstract API
that is implemented by @regex-*@ backends such as:
.
* <https://hackage.haskell.org/package/regex-posix regex-posix>
.
* <https://hackage.haskell.org/package/regex-parsec regex-parsec>
.
* <https://hackage.haskell.org/package/regex-dfa regex-dfa>
.
* <https://hackage.haskell.org/package/regex-tdfa regex-tdfa>
.
* <https://hackage.haskell.org/package/regex-pcre regex-pcre>
.
See also <https://wiki.haskell.org/Regular_expressions> for more information.
extra-source-files:
ChangeLog.md
README.md
tested-with:
GHC == 9.4.1
GHC == 9.2.2
GHC == 9.0.2
GHC == 8.10.7
GHC == 8.8.4
GHC == 8.6.5
GHC == 8.4.4
GHC == 8.2.2
GHC == 8.0.2
GHC == 7.10.3
GHC == 7.8.4
GHC == 7.6.3
GHC == 7.4.2
GHC == 7.2.2
GHC == 7.0.4
source-repository head
type: git
location: https://github.com/haskell-hvr/regex-base.git
source-repository this
type: git
location: https://github.com/haskell-hvr/regex-base.git
tag: v0.94.0.2
library
hs-source-dirs: src
exposed-modules:
Text.Regex.Base
Text.Regex.Base.RegexLike
Text.Regex.Base.Context
Text.Regex.Base.Impl
other-modules:
Paths_regex_base
default-language: Haskell2010
other-extensions:
MultiParamTypeClasses
FunctionalDependencies
TypeSynonymInstances
FlexibleInstances
FlexibleContexts
if impl(ghc >= 7.4)
default-extensions: Safe
build-depends: containers >= 0.4.2.1
, bytestring >= 0.9.2.1
build-depends: base >= 4.3 && < 5
, containers >= 0.4 && < 0.7
, bytestring >= 0.9 && < 0.12
, array >= 0.3 && < 0.6
, text >= 1.2.3 && < 1.3 || >=2.0 && <2.1
if !impl(ghc >= 8)
build-depends: fail == 4.9.*
ghc-options: -Wall
if impl(ghc >= 8)
ghc-options: -Wcompat
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-random for openSUSE:Factory checked in at 2022-08-01 21:30:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-random (Old)
and /work/SRC/openSUSE:Factory/.ghc-random.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-random"
Mon Aug 1 21:30:19 2022 rev:22 rq:987077 version:1.2.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-random/ghc-random.changes 2021-10-12 21:50:17.975952999 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-random.new.1533/ghc-random.changes 2022-08-01 21:30:38.777699041 +0200
@@ -1,0 +2,7 @@
+Mon May 9 02:32:03 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update random to version 1.2.1.1.
+ Upstream has not updated the file "CHANGELOG.md" since the last
+ release.
+
+-------------------------------------------------------------------
Old:
----
random-1.2.1.tar.gz
New:
----
random-1.2.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-random.spec ++++++
--- /var/tmp/diff_new_pack.lF11Vq/_old 2022-08-01 21:30:39.425700900 +0200
+++ /var/tmp/diff_new_pack.lF11Vq/_new 2022-08-01 21:30:39.433700923 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-random
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# 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 random
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.2.1
+Version: 1.2.1.1
Release: 0
Summary: Pseudo-random number generation
License: BSD-3-Clause
++++++ random-1.2.1.tar.gz -> random-1.2.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/random-1.2.1/random.cabal new/random-1.2.1.1/random.cabal
--- old/random-1.2.1/random.cabal 2021-09-19 21:39:00.000000000 +0200
+++ new/random-1.2.1.1/random.cabal 2022-05-09 03:39:12.000000000 +0200
@@ -1,6 +1,6 @@
cabal-version: >=1.10
name: random
-version: 1.2.1
+version: 1.2.1.1
license: BSD3
license-file: LICENSE
maintainer: core-libraries-committee(a)haskell.org
@@ -101,13 +101,11 @@
base >=4.8 && <5,
bytestring >=0.10.4 && <0.12,
deepseq >=1.1 && <2,
- mtl >=2.2 && <2.3,
+ mtl >=2.2 && <2.4,
splitmix >=0.1 && <0.2
if impl(ghc < 8.0)
build-depends:
transformers
- if impl(ghc < 8.4)
- build-depends: ghc-byteorder
test-suite legacy-test
type: exitcode-stdio-1.0
@@ -121,7 +119,7 @@
RangeTest
default-language: Haskell2010
- ghc-options: -with-rtsopts=-M4M
+ ghc-options: -with-rtsopts=-M8M
if impl(ghc >= 8.0)
ghc-options:
-Wno-deprecations
@@ -137,7 +135,7 @@
default-language: Haskell2010
build-depends:
base,
- doctest >=0.15 && <0.19
+ doctest >=0.15 && <0.21
if impl(ghc >= 8.2) && impl(ghc < 8.10)
build-depends:
mwc-random >=0.13 && <0.16,
@@ -206,7 +204,7 @@
random,
rdtsc,
split >=0.2 && <0.3,
- time >=1.4 && <1.11
+ time >=1.4 && <1.13
benchmark bench
type: exitcode-stdio-1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/random-1.2.1/src/System/Random/Stateful.hs new/random-1.2.1.1/src/System/Random/Stateful.hs
--- old/random-1.2.1/src/System/Random/Stateful.hs 2021-09-19 23:07:26.000000000 +0200
+++ new/random-1.2.1.1/src/System/Random/Stateful.hs 2022-05-08 17:45:47.000000000 +0200
@@ -105,10 +105,11 @@
) where
import Control.DeepSeq
+import Control.Monad (replicateM)
import Control.Monad.IO.Class
import Control.Monad.ST
import GHC.Conc.Sync (STM, TVar, newTVar, newTVarIO, readTVar, writeTVar)
-import Control.Monad.State.Strict
+import Control.Monad.State.Strict (MonadState, state)
import Data.IORef
import Data.STRef
import Foreign.Storable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/random-1.2.1/test-legacy/RangeTest.hs new/random-1.2.1.1/test-legacy/RangeTest.hs
--- old/random-1.2.1/test-legacy/RangeTest.hs 2021-09-05 22:49:05.000000000 +0200
+++ new/random-1.2.1.1/test-legacy/RangeTest.hs 2022-05-08 17:48:21.000000000 +0200
@@ -10,7 +10,7 @@
approxBounds ::
(RandomGen g, Random a, Ord a, Num a) =>
(g -> (a,g)) -> Int -> a -> (a,a) -> g -> ((a,a,a),g)
--- Here we do a little hack to essentiall pass in the type in the last argument:
+-- Here we do a little hack to essentially pass in the type in the last argument:
approxBounds nxt iters unused (explo,exphi) initrng =
if False
then ((unused,unused,unused),undefined)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-quickcheck-instances for openSUSE:Factory checked in at 2022-08-01 21:30:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-quickcheck-instances (Old)
and /work/SRC/openSUSE:Factory/.ghc-quickcheck-instances.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-quickcheck-instances"
Mon Aug 1 21:30:19 2022 rev:6 rq:987076 version:0.3.27
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-quickcheck-instances/ghc-quickcheck-instances.changes 2022-02-11 23:11:26.327298125 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-quickcheck-instances.new.1533/ghc-quickcheck-instances.changes 2022-08-01 21:30:37.921696585 +0200
@@ -1,0 +2,6 @@
+Mon Jun 20 05:44:00 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update quickcheck-instances to version 0.3.27 revision 2.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-quickcheck-instances.spec ++++++
--- /var/tmp/diff_new_pack.57Qlw9/_old 2022-08-01 21:30:38.517698295 +0200
+++ /var/tmp/diff_new_pack.57Qlw9/_new 2022-08-01 21:30:38.521698306 +0200
@@ -25,7 +25,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-OneTuple-devel
BuildRequires: ghc-QuickCheck-devel
++++++ quickcheck-instances.cabal ++++++
--- /var/tmp/diff_new_pack.57Qlw9/_old 2022-08-01 21:30:38.565698433 +0200
+++ /var/tmp/diff_new_pack.57Qlw9/_new 2022-08-01 21:30:38.569698444 +0200
@@ -1,6 +1,6 @@
name: quickcheck-instances
version: 0.3.27
-x-revision: 1
+x-revision: 2
synopsis: Common quickcheck instances
description:
QuickCheck instances.
@@ -106,7 +106,7 @@
, transformers-compat >=0.6.5 && <0.8
, unordered-containers >=0.2.2.0 && <0.3
, uuid-types >=1.0.3 && <1.1
- , vector >=0.9 && <0.13
+ , vector >=0.9 && <0.14
-- version is irrelevant.
build-depends: time
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-postgresql-simple for openSUSE:Factory checked in at 2022-08-01 21:30:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-postgresql-simple (Old)
and /work/SRC/openSUSE:Factory/.ghc-postgresql-simple.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-postgresql-simple"
Mon Aug 1 21:30:18 2022 rev:12 rq:987075 version:0.6.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-postgresql-simple/ghc-postgresql-simple.changes 2022-02-11 23:11:25.051294435 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-postgresql-simple.new.1533/ghc-postgresql-simple.changes 2022-08-01 21:30:37.053694095 +0200
@@ -1,0 +2,6 @@
+Mon Jun 20 13:30:22 UTC 2022 - Peter Simons <psimons(a)suse.com>
+
+- Update postgresql-simple to version 0.6.4 revision 8.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-postgresql-simple.spec ++++++
--- /var/tmp/diff_new_pack.CnwNkQ/_old 2022-08-01 21:30:37.705695966 +0200
+++ /var/tmp/diff_new_pack.CnwNkQ/_new 2022-08-01 21:30:37.709695977 +0200
@@ -25,7 +25,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/6.cabal…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/8.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-Only-devel
BuildRequires: ghc-aeson-devel
++++++ postgresql-simple.cabal ++++++
--- /var/tmp/diff_new_pack.CnwNkQ/_old 2022-08-01 21:30:37.777696172 +0200
+++ /var/tmp/diff_new_pack.CnwNkQ/_new 2022-08-01 21:30:37.781696183 +0200
@@ -1,7 +1,7 @@
cabal-version: 1.12
name: postgresql-simple
version: 0.6.4
-x-revision: 6
+x-revision: 8
synopsis: Mid-Level PostgreSQL client library
description:
Mid-Level PostgreSQL client library, forked from mysql-simple.
@@ -90,7 +90,7 @@
-- Other dependencies
build-depends:
- aeson >=1.4.1.0 && <1.6 || >=2.0.0.0 && <2.1
+ aeson >=1.4.1.0 && <1.6 || >=2.0.0.0 && <2.2
, attoparsec >=0.13.2.2 && <0.15
, bytestring-builder >=0.10.8.1.0 && <0.11
, case-insensitive >=1.2.0.11 && <1.3
@@ -99,7 +99,7 @@
, postgresql-libpq >=0.9.4.3 && <0.10
, scientific >=0.3.6.2 && <0.4
, uuid-types >=1.0.3 && <1.1
- , vector >=0.12.0.1 && <0.13
+ , vector >=0.12.0.1 && <0.14
if !impl(ghc >=8.0)
build-depends:
@@ -137,7 +137,7 @@
main-is: Inspection.hs
build-depends:
base
- , inspection-testing >=0.4.1.1 && <0.5
+ , inspection-testing >=0.4.1.1 && <0.6
, postgresql-libpq
, postgresql-simple
, tasty
1
0