Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-unliftio for openSUSE:Factory 
checked in at 2023-06-22 23:25:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-unliftio (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-unliftio.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-unliftio"

Thu Jun 22 23:25:37 2023 rev:25 rq:1094453 version:0.2.25.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-unliftio/ghc-unliftio.changes        
2023-04-04 21:24:38.734632553 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-unliftio.new.15902/ghc-unliftio.changes     
2023-06-22 23:26:09.449871080 +0200
@@ -1,0 +2,8 @@
+Fri Jun 16 04:22:57 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Update unliftio to version 0.2.25.0.
+  ## 0.2.25.0
+
+  * Add `UnliftIO.Exception.Lens`
+
+-------------------------------------------------------------------

Old:
----
  unliftio-0.2.24.0.tar.gz

New:
----
  unliftio-0.2.25.0.tar.gz

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

Other differences:
------------------
++++++ ghc-unliftio.spec ++++++
--- /var/tmp/diff_new_pack.jf7D6c/_old  2023-06-22 23:26:09.989873833 +0200
+++ /var/tmp/diff_new_pack.jf7D6c/_new  2023-06-22 23:26:09.993873854 +0200
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.24.0
+Version:        0.2.25.0
 Release:        0
 Summary:        The MonadUnliftIO typeclass for unlifting monads to IO 
(batteries included)
 License:        MIT

++++++ unliftio-0.2.24.0.tar.gz -> unliftio-0.2.25.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unliftio-0.2.24.0/ChangeLog.md 
new/unliftio-0.2.25.0/ChangeLog.md
--- old/unliftio-0.2.24.0/ChangeLog.md  2023-02-28 10:11:56.000000000 +0100
+++ new/unliftio-0.2.25.0/ChangeLog.md  2023-06-16 06:22:03.000000000 +0200
@@ -1,5 +1,9 @@
 # Changelog for unliftio
 
+## 0.2.25.0
+
+* Add `UnliftIO.Exception.Lens`
+
 ## 0.2.24.0
 
 * Add `UnliftIO.STM.writeTMVar`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unliftio-0.2.24.0/src/UnliftIO/Exception/Lens.hs 
new/unliftio-0.2.25.0/src/UnliftIO/Exception/Lens.hs
--- old/unliftio-0.2.24.0/src/UnliftIO/Exception/Lens.hs        1970-01-01 
01:00:00.000000000 +0100
+++ new/unliftio-0.2.25.0/src/UnliftIO/Exception/Lens.hs        2023-06-16 
06:22:03.000000000 +0200
@@ -0,0 +1,105 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+-- | Functions from "Control.Exception.Lens", but using 'MonadUnliftIO', not
+-- 'MonadCatch'
+module UnliftIO.Exception.Lens
+  ( catching
+  , catching_
+  , handling
+  , handling_
+  , trying
+  , trying_
+  ) where
+
+import Prelude
+
+import Control.Monad.IO.Unlift (MonadUnliftIO)
+import Control.Monad (liftM)
+import Data.Monoid (First)
+import UnliftIO.Exception (SomeException, catchJust, tryJust)
+import Control.Applicative (Const(..))
+import Data.Monoid (First(..))
+
+#if __GLASGOW_HASKELL__ >= 708
+import Data.Coerce
+#else
+import Unsafe.Coerce
+#endif
+
+-- | 'Control.Exception.Lens.catching' using 'MonadUnliftIO'
+--
+-- @since 0.2.25.0
+catching :: MonadUnliftIO m => Getting (First a) SomeException a -> m r -> (a 
-> m r) -> m r
+catching l = catchJust (preview l)
+{-# INLINE catching #-}
+
+-- | 'Control.Exception.Lens.catching_' using 'MonadUnliftIO'
+--
+-- @since 0.2.25.0
+catching_ :: MonadUnliftIO m => Getting (First a) SomeException a -> m r -> m 
r -> m r
+catching_ l a b = catchJust (preview l) a (const b)
+{-# INLINE catching_ #-}
+
+-- | 'Control.Exception.Lens.handling' using 'MonadUnliftIO'
+--
+-- @since 0.2.25.0
+handling :: MonadUnliftIO m => Getting (First a) SomeException a -> (a -> m r) 
-> m r -> m r
+handling l = flip (catching l)
+{-# INLINE handling #-}
+
+-- | 'Control.Exception.Lens.handling_' using 'MonadUnliftIO'
+--
+-- @since 0.2.25.0
+handling_ :: MonadUnliftIO m => Getting (First a) SomeException a -> m r -> m 
r -> m r
+handling_ l = flip (catching_ l)
+{-# INLINE handling_ #-}
+
+-- | 'Control.Exception.Lens.trying' using 'MonadUnliftIO'
+--
+-- @since 0.2.25.0
+trying :: MonadUnliftIO m => Getting (First a) SomeException a -> m r -> m 
(Either a r)
+trying l = tryJust (preview l)
+{-# INLINE trying #-}
+
+-- | 'Control.Exception.Lens.trying_' using 'MonadUnliftIO'
+--
+-- @since 0.2.25.0
+trying_ :: MonadUnliftIO m => Getting (First a) SomeException a -> m r -> m 
(Maybe r)
+trying_ l m = preview _Right `liftM` trying l m
+{-# INLINE trying_ #-}
+
+--------------------------------------------------------------------------------
+-- Enough of (micro)lens to accomplish this mondule without any dependencies
+--
+-- TODO: code review note: should we just bring in microlens?
+--------------------------------------------------------------------------------
+type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
+
+_Right :: Traversal (Either a b) (Either a b') b b'
+_Right f (Right b) = Right <$> f b
+_Right _ (Left a) = pure (Left a)
+{-# INLINE _Right #-}
+
+type Getting r s a = (a -> Const r a) -> s -> Const r s
+
+preview :: Getting (First a) s a -> s -> Maybe a
+preview l = getFirst #. foldMapOf l (First #. Just)
+{-# INLINE preview #-}
+
+foldMapOf :: Getting r s a -> (a -> r) -> s -> r
+foldMapOf l f = getConst #. l (Const #. f)
+{-# INLINE foldMapOf #-}
+
+#if __GLASGOW_HASKELL__ >= 708
+( #. ) :: Coercible c b => (b -> c) -> (a -> b) -> (a -> c)
+( #. ) _ = coerce (\x -> x :: b) :: forall a b. Coercible b a => a -> b
+#else
+( #. ) :: (b -> c) -> (a -> b) -> (a -> c)
+( #. ) _ = unsafeCoerce
+#endif
+
+{-# INLINE ( #. ) #-}
+
+infixr 9 #.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unliftio-0.2.24.0/unliftio.cabal 
new/unliftio-0.2.25.0/unliftio.cabal
--- old/unliftio-0.2.24.0/unliftio.cabal        2023-02-28 10:13:47.000000000 
+0100
+++ new/unliftio-0.2.25.0/unliftio.cabal        2023-06-16 06:22:31.000000000 
+0200
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           unliftio
-version:        0.2.24.0
+version:        0.2.25.0
 synopsis:       The MonadUnliftIO typeclass for unlifting monads to IO 
(batteries included)
 description:    Please see the documentation and README at 
<https://www.stackage.org/package/unliftio>
 category:       Control
@@ -29,6 +29,7 @@
       UnliftIO.Directory
       UnliftIO.Environment
       UnliftIO.Exception
+      UnliftIO.Exception.Lens
       UnliftIO.Foreign
       UnliftIO.Internals.Async
       UnliftIO.IO

Reply via email to