Hello community,

here is the log from the commit of package ghc-retry for openSUSE:Factory 
checked in at 2018-09-03 10:34:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-retry (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-retry.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-retry"

Mon Sep  3 10:34:44 2018 rev:13 rq:632485 version:0.7.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-retry/ghc-retry.changes      2018-08-20 
16:20:54.768948924 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-retry.new/ghc-retry.changes 2018-09-03 
10:34:48.408623623 +0200
@@ -1,0 +2,7 @@
+Thu Aug 30 15:29:10 UTC 2018 - psim...@suse.com
+
+- Update retry to version 0.7.7.0.
+  0.7.7.0
+  * Add `natTransformRetryPolicy`
+
+-------------------------------------------------------------------

Old:
----
  retry-0.7.6.3.tar.gz

New:
----
  retry-0.7.7.0.tar.gz

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

Other differences:
------------------
++++++ ghc-retry.spec ++++++
--- /var/tmp/diff_new_pack.KtKp9L/_old  2018-09-03 10:34:50.108628007 +0200
+++ /var/tmp/diff_new_pack.KtKp9L/_new  2018-09-03 10:34:50.112628018 +0200
@@ -19,7 +19,7 @@
 %global pkg_name retry
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.7.6.3
+Version:        0.7.7.0
 Release:        0
 Summary:        Retry combinators for monadic actions that may fail
 License:        BSD-3-Clause

++++++ retry-0.7.6.3.tar.gz -> retry-0.7.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/retry-0.7.6.3/changelog.md 
new/retry-0.7.7.0/changelog.md
--- old/retry-0.7.6.3/changelog.md      2018-08-14 17:10:56.000000000 +0200
+++ new/retry-0.7.7.0/changelog.md      2018-08-17 00:08:54.000000000 +0200
@@ -1,3 +1,6 @@
+0.7.7.0
+* Add `natTransformRetryPolicy`
+
 0.7.6.3
 * Documentation fix on `recoverAll`
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/retry-0.7.6.3/retry.cabal 
new/retry-0.7.7.0/retry.cabal
--- old/retry-0.7.6.3/retry.cabal       2018-08-14 17:11:06.000000000 +0200
+++ new/retry-0.7.7.0/retry.cabal       2018-08-28 01:35:43.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.7.6.3
+version:             0.7.7.0
 synopsis:            Retry combinators for monadic actions that may fail
 license:             BSD3
 license-file:        LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/retry-0.7.6.3/src/Control/Retry.hs 
new/retry-0.7.7.0/src/Control/Retry.hs
--- old/retry-0.7.6.3/src/Control/Retry.hs      2018-08-14 17:09:35.000000000 
+0200
+++ new/retry-0.7.7.0/src/Control/Retry.hs      2018-08-17 00:07:47.000000000 
+0200
@@ -35,6 +35,7 @@
       RetryPolicyM (..)
     , RetryPolicy
     , retryPolicy
+    , natTransformRetryPolicy
     , RetryStatus (..)
     , defaultRetryStatus
     , applyPolicy
@@ -177,6 +178,21 @@
 
 
 -------------------------------------------------------------------------------
+-- | Applies a natural transformation to a policy to run a RetryPolicy
+-- meant for the monad @m@ in the monad @n@ provided a transformation
+-- from @m@ to @n@ is available. A common case is if you have a pure
+-- policy, @RetryPolicyM Identity@ and want to use it to govern an
+-- @IO@ computation you could write:
+--
+-- @
+--   purePolicyInIO :: RetryPolicyM Identity -> RetryPolicyM IO
+--   purePolicyInIO = natTransformRetryPolicy (pure . runIdentity)
+-- @
+natTransformRetryPolicy :: (forall a. m a -> n a) -> RetryPolicyM m -> 
RetryPolicyM n
+natTransformRetryPolicy f (RetryPolicyM p) = RetryPolicyM $ \stat -> f (p stat)
+
+
+-------------------------------------------------------------------------------
 -- | Datatype with stats about retries made thus far. The constructor
 -- is deliberately not exported to make additional fields easier to
 -- add in a backward-compatible manner. To read or modify fields in


Reply via email to