Hello community, here is the log from the commit of package ghc-exceptions for openSUSE:Factory checked in at 2015-05-21 08:10:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-exceptions (Old) and /work/SRC/openSUSE:Factory/.ghc-exceptions.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-exceptions" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-exceptions/ghc-exceptions.changes 2015-03-19 21:20:35.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-exceptions.new/ghc-exceptions.changes 2015-05-21 08:10:48.000000000 +0200 @@ -1,0 +2,7 @@ +Tue Apr 21 20:02:51 UTC 2015 - [email protected] + +- update to 0.8.0.2 +* Use `transformers-compat` to allow support for `ExceptT` even on older `transformers` versions. +* `stm` support + +------------------------------------------------------------------- Old: ---- exceptions-0.6.1.tar.gz New: ---- exceptions-0.8.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-exceptions.spec ++++++ --- /var/tmp/diff_new_pack.jHZZHs/_old 2015-05-21 08:10:49.000000000 +0200 +++ /var/tmp/diff_new_pack.jHZZHs/_new 2015-05-21 08:10:49.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package ghc +# spec file for package ghc-exceptions # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # @@ -19,7 +19,7 @@ %global pkg_name exceptions Name: ghc-%{pkg_name} -Version: 0.6.1 +Version: 0.8.0.2 Release: 0 Summary: Exceptions library License: BSD-3-Clause @@ -32,6 +32,8 @@ BuildRequires: ghc-rpm-macros # Begin cabal-rpm deps: BuildRequires: ghc-mtl-devel +BuildRequires: ghc-stm-devel +BuildRequires: ghc-transformers-compat-devel BuildRequires: ghc-transformers-devel # End cabal-rpm deps ++++++ exceptions-0.6.1.tar.gz -> exceptions-0.8.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/.travis.yml new/exceptions-0.8.0.2/.travis.yml --- old/exceptions-0.6.1/.travis.yml 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/.travis.yml 2015-03-14 17:50:47.000000000 +0100 @@ -1,18 +1,55 @@ -language: haskell -before_install: - # Uncomment whenever hackage is down. - # - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && cabal update - - cabal update +# NB: don't set `language: haskell` here + +# See also https://github.com/hvr/multi-ghc-travis for more information +env: + # we have to use CABALVER=1.16 for GHC<7.6 as well, as there's + # no package for earlier cabal versions in the PPA + - GHCVER=7.4.2 CABALVER=1.16 + - GHCVER=7.6.3 CABALVER=1.16 + - GHCVER=7.8.4 CABALVER=1.18 + - GHCVER=7.10.1 CABALVER=1.22 + - GHCVER=head CABALVER=1.22 - # Try installing some of the build-deps with apt-get for speed. - - travis/cabal-apt-install $mode +matrix: + allow_failures: + - env: GHCVER=head CABALVER=1.22 + +# Note: the distinction between `before_install` and `install` is not +# important. +before_install: + - travis_retry sudo add-apt-repository -y ppa:hvr/ghc + - travis_retry sudo apt-get update + - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH + - cabal --version install: - - cabal configure -flib-Werror $mode - - cabal build + - travis_retry cabal update + - cabal install --only-dependencies +# Here starts the actual work to be performed for the package under +# test; any command which exits with a non-zero exit code causes the +# build to fail. script: - - $script && hlint src --cpp-define HLINT + # -v2 provides useful information for debugging + - cabal configure -v2 + + # this builds all libraries and executables + # (including tests/benchmarks) + - cabal build + + # tests that a source-distribution can be generated + - cabal sdist + + # check that the generated source-distribution can be built & installed + - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; + cd dist/; + if [ -f "$SRC_TGZ" ]; then + cabal install --force-reinstalls "$SRC_TGZ"; + else + echo "expected '$SRC_TGZ' not found"; + exit 1; + fi notifications: irc: @@ -21,6 +58,3 @@ skip_join: true template: - "\x0313exceptions\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}" - -env: - - mode="--enable-tests" script="cabal test --show-details=always" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/CHANGELOG.markdown new/exceptions-0.8.0.2/CHANGELOG.markdown --- old/exceptions-0.6.1/CHANGELOG.markdown 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/CHANGELOG.markdown 2015-03-14 17:50:47.000000000 +0100 @@ -1,8 +1,24 @@ +0.8.0.1 +------- +* Resolved warnings on GHC 7.10 and with transformers 0.4. + +0.8 +--- +* Use `transformers-compat` to allow support for `ExceptT` even on older `transformers` versions. + +0.7 +--- +* `stm` support + 0.6 --- * Split out `MonadMask` * Added `transformers` 0.4 support +0.5 +--- +* Added instances of `MonadThrow` for `ListT`, `MaybeT`, `ErrorT` and `ContT`. + 0.4 --- * Factored out a separate `MonadThrow`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/LICENSE new/exceptions-0.8.0.2/LICENSE --- old/exceptions-0.6.1/LICENSE 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/LICENSE 2015-03-14 17:50:47.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright 2013-2014 Edward Kmett +Copyright 2013-2015 Edward Kmett Copyright 2012 Google Inc. All rights reserved. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/exceptions.cabal new/exceptions-0.8.0.2/exceptions.cabal --- old/exceptions-0.6.1/exceptions.cabal 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/exceptions.cabal 2015-03-14 17:50:47.000000000 +0100 @@ -1,6 +1,6 @@ name: exceptions category: Control, Exceptions, Monad -version: 0.6.1 +version: 0.8.0.2 cabal-version: >= 1.8 license: BSD3 license-file: LICENSE @@ -9,10 +9,10 @@ stability: provisional homepage: http://github.com/ekmett/exceptions/ bug-reports: http://github.com/ekmett/exceptions/issues -copyright: Copyright (C) 2013-2014 Edward A. Kmett +copyright: Copyright (C) 2013-2015 Edward A. Kmett Copyright (C) 2012 Google Inc. build-type: Simple -tested-with: GHC == 7.4.1, GHC == 7.6.1, GHC == 7.8.2 +tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.0.20150307 synopsis: Extensible optionally-pure exceptions description: Extensible optionally-pure exceptions @@ -34,7 +34,9 @@ library build-depends: base >= 4.3 && < 5, + stm >= 2.2 && < 3, transformers >= 0.2 && < 0.5, + transformers-compat >= 0.3 && < 0.5, mtl >= 2.0 && < 2.3 exposed-modules: @@ -52,7 +54,9 @@ type: exitcode-stdio-1.0 build-depends: base, + stm, transformers, + transformers-compat, mtl, test-framework >= 0.8 && < 0.9, test-framework-quickcheck2 >= 0.3 && < 0.4, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/src/Control/Monad/Catch/Pure.hs new/exceptions-0.8.0.2/src/Control/Monad/Catch/Pure.hs --- old/exceptions-0.6.1/src/Control/Monad/Catch/Pure.hs 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/src/Control/Monad/Catch/Pure.hs 2015-03-14 17:50:47.000000000 +0100 @@ -20,7 +20,7 @@ -------------------------------------------------------------------- -- | --- Copyright : (C) Edward Kmett 2013-2014, (c) Google Inc. 2012 +-- Copyright : (C) Edward Kmett 2013-2015, (c) Google Inc. 2012 -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <[email protected]> -- Stability : experimental @@ -56,7 +56,9 @@ import Control.Monad.Catch import Control.Monad.Reader as Reader import Control.Monad.RWS +#if __GLASGOW_HASKELL__ < 710 import Data.Foldable +#endif import Data.Functor.Identity import Data.Traversable as Traversable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/src/Control/Monad/Catch.hs new/exceptions-0.8.0.2/src/Control/Monad/Catch.hs --- old/exceptions-0.6.1/src/Control/Monad/Catch.hs 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/src/Control/Monad/Catch.hs 2015-03-14 17:50:47.000000000 +0100 @@ -18,9 +18,11 @@ #ifndef MIN_VERSION_mtl #define MIN_VERSION_mtl(x,y,z) 1 #endif + +{-# OPTIONS_GHC -fno-warn-deprecations #-} -------------------------------------------------------------------- -- | --- Copyright : (C) Edward Kmett 2013-2014, (c) Google Inc. 2012 +-- Copyright : (C) Edward Kmett 2013-2015, (c) Google Inc. 2012 -- License : BSD-style (see the file LICENSE) -- Maintainer : Edward Kmett <[email protected]> -- Stability : experimental @@ -37,7 +39,7 @@ -- This is very similar to 'ErrorT' and 'MonadError', but based on features of -- "Control.Exception". In particular, it handles the complex case of -- asynchronous exceptions by including 'mask' in the typeclass. Note that the --- extensible extensions feature relies the RankNTypes language extension. +-- extensible extensions feature relies on the RankNTypes language extension. -------------------------------------------------------------------- module Control.Monad.Catch ( @@ -73,32 +75,33 @@ , SomeException(..) ) where -#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 706) -import Prelude hiding (foldr) -#else -import Prelude hiding (catch, foldr) -#endif - import Control.Exception (Exception(..), SomeException(..)) import qualified Control.Exception as ControlException +import qualified Control.Monad.STM as STM import qualified Control.Monad.Trans.RWS.Lazy as LazyRWS import qualified Control.Monad.Trans.RWS.Strict as StrictRWS import qualified Control.Monad.Trans.State.Lazy as LazyS import qualified Control.Monad.Trans.State.Strict as StrictS import qualified Control.Monad.Trans.Writer.Lazy as LazyW import qualified Control.Monad.Trans.Writer.Strict as StrictW +import Control.Monad.STM (STM) import Control.Monad.Trans.List (ListT(..), runListT) import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT) import Control.Monad.Trans.Error (ErrorT(..), Error, runErrorT) -#if MIN_VERSION_transformers(0,4,0) import Control.Monad.Trans.Except (ExceptT(..), runExceptT) -#endif import Control.Monad.Trans.Cont (ContT) import Control.Monad.Trans.Identity import Control.Monad.Reader as Reader -import Control.Monad.Trans.Reader (runReaderT) -import Control.Monad.RWS + +#if __GLASGOW_HASKELL__ < 706 +import Prelude hiding (catch, foldr) +import Data.Foldable +import Data.Monoid +#elif __GLASGOW_HASKELL__ < 710 +import Prelude hiding (foldr) import Data.Foldable +import Data.Monoid +#endif ------------------------------------------------------------------------------ -- $mtl @@ -189,16 +192,23 @@ mask = ControlException.mask uninterruptibleMask = ControlException.uninterruptibleMask +instance MonadThrow STM where + throwM = STM.throwSTM +instance MonadCatch STM where + catch = STM.catchSTM + instance MonadThrow m => MonadThrow (IdentityT m) where throwM e = lift $ throwM e instance MonadCatch m => MonadCatch (IdentityT m) where catch (IdentityT m) f = IdentityT (catch m (runIdentityT . f)) instance MonadMask m => MonadMask (IdentityT m) where mask a = IdentityT $ mask $ \u -> runIdentityT (a $ q u) - where q u = IdentityT . u . runIdentityT + where q :: (m a -> m a) -> IdentityT m a -> IdentityT m a + q u = IdentityT . u . runIdentityT uninterruptibleMask a = IdentityT $ uninterruptibleMask $ \u -> runIdentityT (a $ q u) - where q u = IdentityT . u . runIdentityT + where q :: (m a -> m a) -> IdentityT m a -> IdentityT m a + q u = IdentityT . u . runIdentityT instance MonadThrow m => MonadThrow (LazyS.StateT s m) where throwM e = lift $ throwM e @@ -206,10 +216,12 @@ catch = LazyS.liftCatch catch instance MonadMask m => MonadMask (LazyS.StateT s m) where mask a = LazyS.StateT $ \s -> mask $ \u -> LazyS.runStateT (a $ q u) s - where q u (LazyS.StateT b) = LazyS.StateT (u . b) + where q :: (m (a, s) -> m (a, s)) -> LazyS.StateT s m a -> LazyS.StateT s m a + q u (LazyS.StateT b) = LazyS.StateT (u . b) uninterruptibleMask a = LazyS.StateT $ \s -> uninterruptibleMask $ \u -> LazyS.runStateT (a $ q u) s - where q u (LazyS.StateT b) = LazyS.StateT (u . b) + where q :: (m (a, s) -> m (a, s)) -> LazyS.StateT s m a -> LazyS.StateT s m a + q u (LazyS.StateT b) = LazyS.StateT (u . b) instance MonadThrow m => MonadThrow (StrictS.StateT s m) where throwM e = lift $ throwM e @@ -217,10 +229,12 @@ catch = StrictS.liftCatch catch instance MonadMask m => MonadMask (StrictS.StateT s m) where mask a = StrictS.StateT $ \s -> mask $ \u -> StrictS.runStateT (a $ q u) s - where q u (StrictS.StateT b) = StrictS.StateT (u . b) + where q :: (m (a, s) -> m (a, s)) -> StrictS.StateT s m a -> StrictS.StateT s m a + q u (StrictS.StateT b) = StrictS.StateT (u . b) uninterruptibleMask a = StrictS.StateT $ \s -> uninterruptibleMask $ \u -> StrictS.runStateT (a $ q u) s - where q u (StrictS.StateT b) = StrictS.StateT (u . b) + where q :: (m (a, s) -> m (a, s)) -> StrictS.StateT s m a -> StrictS.StateT s m a + q u (StrictS.StateT b) = StrictS.StateT (u . b) instance MonadThrow m => MonadThrow (ReaderT r m) where throwM e = lift $ throwM e @@ -228,10 +242,12 @@ catch (ReaderT m) c = ReaderT $ \r -> m r `catch` \e -> runReaderT (c e) r instance MonadMask m => MonadMask (ReaderT r m) where mask a = ReaderT $ \e -> mask $ \u -> runReaderT (a $ q u) e - where q u (ReaderT b) = ReaderT (u . b) + where q :: (m a -> m a) -> ReaderT e m a -> ReaderT e m a + q u (ReaderT b) = ReaderT (u . b) uninterruptibleMask a = ReaderT $ \e -> uninterruptibleMask $ \u -> runReaderT (a $ q u) e - where q u (ReaderT b) = ReaderT (u . b) + where q :: (m a -> m a) -> ReaderT e m a -> ReaderT e m a + q u (ReaderT b) = ReaderT (u . b) instance (MonadThrow m, Monoid w) => MonadThrow (StrictW.WriterT w m) where throwM e = lift $ throwM e @@ -239,10 +255,12 @@ catch (StrictW.WriterT m) h = StrictW.WriterT $ m `catch ` \e -> StrictW.runWriterT (h e) instance (MonadMask m, Monoid w) => MonadMask (StrictW.WriterT w m) where mask a = StrictW.WriterT $ mask $ \u -> StrictW.runWriterT (a $ q u) - where q u b = StrictW.WriterT $ u (StrictW.runWriterT b) + where q :: (m (a, w) -> m (a, w)) -> StrictW.WriterT w m a -> StrictW.WriterT w m a + q u b = StrictW.WriterT $ u (StrictW.runWriterT b) uninterruptibleMask a = StrictW.WriterT $ uninterruptibleMask $ \u -> StrictW.runWriterT (a $ q u) - where q u b = StrictW.WriterT $ u (StrictW.runWriterT b) + where q :: (m (a, w) -> m (a, w)) -> StrictW.WriterT w m a -> StrictW.WriterT w m a + q u b = StrictW.WriterT $ u (StrictW.runWriterT b) instance (MonadThrow m, Monoid w) => MonadThrow (LazyW.WriterT w m) where throwM e = lift $ throwM e @@ -250,10 +268,12 @@ catch (LazyW.WriterT m) h = LazyW.WriterT $ m `catch ` \e -> LazyW.runWriterT (h e) instance (MonadMask m, Monoid w) => MonadMask (LazyW.WriterT w m) where mask a = LazyW.WriterT $ mask $ \u -> LazyW.runWriterT (a $ q u) - where q u b = LazyW.WriterT $ u (LazyW.runWriterT b) + where q :: (m (a, w) -> m (a, w)) -> LazyW.WriterT w m a -> LazyW.WriterT w m a + q u b = LazyW.WriterT $ u (LazyW.runWriterT b) uninterruptibleMask a = LazyW.WriterT $ uninterruptibleMask $ \u -> LazyW.runWriterT (a $ q u) - where q u b = LazyW.WriterT $ u (LazyW.runWriterT b) + where q :: (m (a, w) -> m (a, w)) -> LazyW.WriterT w m a -> LazyW.WriterT w m a + q u b = LazyW.WriterT $ u (LazyW.runWriterT b) instance (MonadThrow m, Monoid w) => MonadThrow (LazyRWS.RWST r w s m) where throwM e = lift $ throwM e @@ -261,10 +281,12 @@ catch (LazyRWS.RWST m) h = LazyRWS.RWST $ \r s -> m r s `catch` \e -> LazyRWS.runRWST (h e) r s instance (MonadMask m, Monoid w) => MonadMask (LazyRWS.RWST r w s m) where mask a = LazyRWS.RWST $ \r s -> mask $ \u -> LazyRWS.runRWST (a $ q u) r s - where q u (LazyRWS.RWST b) = LazyRWS.RWST $ \ r s -> u (b r s) + where q :: (m (a, s, w) -> m (a, s, w)) -> LazyRWS.RWST r w s m a -> LazyRWS.RWST r w s m a + q u (LazyRWS.RWST b) = LazyRWS.RWST $ \ r s -> u (b r s) uninterruptibleMask a = LazyRWS.RWST $ \r s -> uninterruptibleMask $ \u -> LazyRWS.runRWST (a $ q u) r s - where q u (LazyRWS.RWST b) = LazyRWS.RWST $ \ r s -> u (b r s) + where q :: (m (a, s, w) -> m (a, s, w)) -> LazyRWS.RWST r w s m a -> LazyRWS.RWST r w s m a + q u (LazyRWS.RWST b) = LazyRWS.RWST $ \ r s -> u (b r s) instance (MonadThrow m, Monoid w) => MonadThrow (StrictRWS.RWST r w s m) where throwM e = lift $ throwM e @@ -272,10 +294,12 @@ catch (StrictRWS.RWST m) h = StrictRWS.RWST $ \r s -> m r s `catch` \e -> StrictRWS.runRWST (h e) r s instance (MonadMask m, Monoid w) => MonadMask (StrictRWS.RWST r w s m) where mask a = StrictRWS.RWST $ \r s -> mask $ \u -> StrictRWS.runRWST (a $ q u) r s - where q u (StrictRWS.RWST b) = StrictRWS.RWST $ \ r s -> u (b r s) + where q :: (m (a, s, w) -> m (a, s, w)) -> StrictRWS.RWST r w s m a -> StrictRWS.RWST r w s m a + q u (StrictRWS.RWST b) = StrictRWS.RWST $ \ r s -> u (b r s) uninterruptibleMask a = StrictRWS.RWST $ \r s -> uninterruptibleMask $ \u -> StrictRWS.runRWST (a $ q u) r s - where q u (StrictRWS.RWST b) = StrictRWS.RWST $ \ r s -> u (b r s) + where q :: (m (a, s, w) -> m (a, s, w)) -> StrictRWS.RWST r w s m a -> StrictRWS.RWST r w s m a + q u (StrictRWS.RWST b) = StrictRWS.RWST $ \ r s -> u (b r s) -- Transformers which are only instances of MonadThrow and MonadCatch, not MonadMask instance MonadThrow m => MonadThrow (ListT m) where @@ -297,14 +321,12 @@ instance (Error e, MonadCatch m) => MonadCatch (ErrorT e m) where catch (ErrorT m) f = ErrorT $ catch m (runErrorT . f) -#if MIN_VERSION_transformers(0,4,0) -- | Throws exceptions into the base monad. instance MonadThrow m => MonadThrow (ExceptT e m) where throwM = lift . throwM -- | Catches exceptions from the base monad. instance MonadCatch m => MonadCatch (ExceptT e m) where catch (ExceptT m) f = ExceptT $ catch m (runExceptT . f) -#endif instance MonadThrow m => MonadThrow (ContT r m) where throwM = lift . throwM diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exceptions-0.6.1/tests/Control/Monad/Catch/Tests.hs new/exceptions-0.8.0.2/tests/Control/Monad/Catch/Tests.hs --- old/exceptions-0.6.1/tests/Control/Monad/Catch/Tests.hs 2014-05-11 08:20:31.000000000 +0200 +++ new/exceptions-0.8.0.2/tests/Control/Monad/Catch/Tests.hs 2015-03-14 17:50:47.000000000 +0100 @@ -18,6 +18,7 @@ import Control.Monad.List (ListT(..)) import Control.Monad.Trans.Maybe (MaybeT(..)) import Control.Monad.Error (ErrorT(..)) +import Control.Monad.STM (STM, atomically) --import Control.Monad.Cont (ContT(..)) import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) @@ -84,6 +85,7 @@ , MSpec "ListT IO" $ \m -> io $ fmap (\[x] -> x) (runListT m) , MSpec "MaybeT IO" $ \m -> io $ fmap (maybe undefined id) (runMaybeT m) , MSpec "ErrorT IO" $ \m -> io $ fmap (either error id) (runErrorT m) + , MSpec "STM" $ io . atomically --, MSpec "ContT IO" $ \m -> io $ runContT m return , MSpec "CatchT Indentity" $ fromRight . runCatch
