Hello community,

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

Package is "ghc-unliftio-core"

Mon Sep  3 10:35:06 2018 rev:3 rq:632492 version:0.1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-unliftio-core/ghc-unliftio-core.changes      
2018-07-21 10:24:17.886970869 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-unliftio-core.new/ghc-unliftio-core.changes 
2018-09-03 10:35:08.748676104 +0200
@@ -1,0 +2,8 @@
+Thu Aug 30 15:29:10 UTC 2018 - [email protected]
+
+- Update unliftio-core to version 0.1.2.0.
+  ## 0.1.2.0
+
+  * Add `wrappedWithRunInIO`.
+
+-------------------------------------------------------------------

Old:
----
  unliftio-core-0.1.1.0.tar.gz
  unliftio-core.cabal

New:
----
  unliftio-core-0.1.2.0.tar.gz

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

Other differences:
------------------
++++++ ghc-unliftio-core.spec ++++++
--- /var/tmp/diff_new_pack.UiY1yG/_old  2018-09-03 10:35:09.552678178 +0200
+++ /var/tmp/diff_new_pack.UiY1yG/_new  2018-09-03 10:35:09.556678189 +0200
@@ -18,14 +18,13 @@
 
 %global pkg_name unliftio-core
 Name:           ghc-%{pkg_name}
-Version:        0.1.1.0
+Version:        0.1.2.0
 Release:        0
 Summary:        The MonadUnliftIO typeclass for unlifting monads to IO
 License:        MIT
 Group:          Development/Libraries/Haskell
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-transformers-devel
@@ -47,7 +46,6 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ unliftio-core-0.1.1.0.tar.gz -> unliftio-core-0.1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unliftio-core-0.1.1.0/ChangeLog.md 
new/unliftio-core-0.1.2.0/ChangeLog.md
--- old/unliftio-core-0.1.1.0/ChangeLog.md      2018-01-04 04:27:53.000000000 
+0100
+++ new/unliftio-core-0.1.2.0/ChangeLog.md      2018-08-27 20:11:52.000000000 
+0200
@@ -1,3 +1,7 @@
+## 0.1.2.0
+
+* Add `wrappedWithRunInIO`.
+
 ## 0.1.1.0
 
 * Doc improvements.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unliftio-core-0.1.1.0/src/Control/Monad/IO/Unlift.hs 
new/unliftio-core-0.1.2.0/src/Control/Monad/IO/Unlift.hs
--- old/unliftio-core-0.1.1.0/src/Control/Monad/IO/Unlift.hs    2018-01-04 
04:27:53.000000000 +0100
+++ new/unliftio-core-0.1.2.0/src/Control/Monad/IO/Unlift.hs    2018-08-27 
20:11:52.000000000 +0200
@@ -7,10 +7,10 @@
   , askRunInIO
   , withUnliftIO
   , toIO
+  , wrappedWithRunInIO
   , MonadIO (..)
   ) where
 
-import Control.Monad (liftM)
 import Control.Monad.IO.Class
 import Control.Monad.Trans.Reader (ReaderT (..))
 import Control.Monad.Trans.Identity (IdentityT (..))
@@ -57,6 +57,7 @@
   --
   -- See 'UnliftIO' for an explanation of why we need a helper
   -- datatype here.
+  --
   -- @since 0.1.0.0
   askUnliftIO :: m (UnliftIO m)
   askUnliftIO = withRunInIO (\run -> return (UnliftIO run))
@@ -99,7 +100,7 @@
     withRunInIO $ \run ->
     inner (run . runIdentityT)
 
--- | Same ask 'askUnliftIO', but returns a monomorphic function
+-- | Same as 'askUnliftIO', but returns a monomorphic function
 -- instead of a polymorphic newtype wrapper. If you only need to apply
 -- the transformation on one concrete type, this function can be more
 -- convenient.
@@ -125,3 +126,29 @@
 {-# INLINE toIO #-}
 toIO :: MonadUnliftIO m => m a -> m (IO a)
 toIO m = withRunInIO $ \run -> return $ run m
+
+{- | A helper function for implementing @MonadUnliftIO@ instances.
+Useful for the common case where you want to simply delegate to the
+underlying transformer.
+
+@since 0.1.2.0
+==== __Example__
+
+> newtype AppT m a = AppT { unAppT :: ReaderT Int (ResourceT m) a }
+>   deriving (Functor, Applicative, Monad, MonadIO)
+>   -- Unfortunately, deriving MonadUnliftIO does not work.
+>
+> instance MonadUnliftIO m => MonadUnliftIO (AppT m) where
+>   withRunInIO = wrappedWithRunInIO AppT unAppT
+-}
+{-# INLINE wrappedWithRunInIO #-}
+wrappedWithRunInIO :: MonadUnliftIO n
+                   => (n b -> m b)
+                   -- ^ The wrapper, for instance @IdentityT@.
+                   -> (forall a. m a -> n a)
+                   -- ^ The inverse, for instance @runIdentityT@.
+                   -> ((forall a. m a -> IO a) -> IO b)
+                   -- ^ The actual function to invoke 'withRunInIO' with.
+                   -> m b
+wrappedWithRunInIO wrap unwrap inner = wrap $ withRunInIO $ \run ->
+  inner $ run . unwrap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unliftio-core-0.1.1.0/unliftio-core.cabal 
new/unliftio-core-0.1.2.0/unliftio-core.cabal
--- old/unliftio-core-0.1.1.0/unliftio-core.cabal       2018-01-02 
17:28:15.000000000 +0100
+++ new/unliftio-core-0.1.2.0/unliftio-core.cabal       2018-08-28 
09:16:03.000000000 +0200
@@ -1,11 +1,13 @@
--- This file has been generated from package.yaml by hpack version 0.21.2.
+cabal-version: >= 1.10
+
+-- This file has been generated from package.yaml by hpack version 0.29.6.
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 30994f07a9010e7816784501ed5ff3165c34026fa5dc555ebf1a70f6d6c0f1af
+-- hash: 9dda29b2ae88c7aba738c44b9efa373de55a416be845a7bf888fc8c108166fed
 
 name:           unliftio-core
-version:        0.1.1.0
+version:        0.1.2.0
 synopsis:       The MonadUnliftIO typeclass for unlifting monads to IO
 description:    Please see the documentation and README at 
<https://www.stackage.org/package/unliftio-core>
 category:       Control
@@ -16,8 +18,6 @@
 license:        MIT
 license-file:   LICENSE
 build-type:     Simple
-cabal-version:  >= 1.10
-
 extra-source-files:
     ChangeLog.md
     README.md
@@ -26,7 +26,7 @@
   hs-source-dirs:
       src
   build-depends:
-      base >=4.5 && <4.11
+      base >=4.5 && <4.12
     , transformers >=0.2 && <0.6
   exposed-modules:
       Control.Monad.IO.Unlift


Reply via email to