Hello community, here is the log from the commit of package ghc-th-orphans for openSUSE:Factory checked in at 2020-10-23 15:15:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-th-orphans (Old) and /work/SRC/openSUSE:Factory/.ghc-th-orphans.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-th-orphans" Fri Oct 23 15:15:08 2020 rev:11 rq:842770 version:0.13.11 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-th-orphans/ghc-th-orphans.changes 2020-09-07 21:22:47.821034761 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-th-orphans.new.3463/ghc-th-orphans.changes 2020-10-23 15:15:10.958158417 +0200 @@ -1,0 +2,13 @@ +Wed Sep 30 08:36:14 UTC 2020 - [email protected] + +- Update th-orphans to version 0.13.11. + ### 0.13.11 [2020.09.29] + * Allow building with `template-haskell-2.17.0.0` (GHC 9.0). + * Define `Quote` instances for `ReaderT`, `StateT`, `WriterT`, and `RWST`. In + order to define these instances on as many versions of `template-haskell` as + possible, this library now depends on the `th-compat` library, which + backports the `Quote` class to older versions of `template-haskell`. + * Backport the `Semigroup`, `Monoid`, and `MonadFix` instances for `Q` that + were introduced in `template-haskell-2.17.0.0`. + +------------------------------------------------------------------- Old: ---- th-orphans-0.13.10.tar.gz New: ---- th-orphans-0.13.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-th-orphans.spec ++++++ --- /var/tmp/diff_new_pack.bqCenc/_old 2020-10-23 15:15:11.882158863 +0200 +++ /var/tmp/diff_new_pack.bqCenc/_new 2020-10-23 15:15:11.886158865 +0200 @@ -19,7 +19,7 @@ %global pkg_name th-orphans %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.13.10 +Version: 0.13.11 Release: 0 Summary: Orphan instances for TH datatypes License: BSD-3-Clause @@ -29,6 +29,7 @@ BuildRequires: ghc-mtl-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-template-haskell-devel +BuildRequires: ghc-th-compat-devel BuildRequires: ghc-th-lift-devel BuildRequires: ghc-th-lift-instances-devel BuildRequires: ghc-th-reify-many-devel ++++++ th-orphans-0.13.10.tar.gz -> th-orphans-0.13.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-orphans-0.13.10/CHANGELOG.md new/th-orphans-0.13.11/CHANGELOG.md --- old/th-orphans-0.13.10/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/th-orphans-0.13.11/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,12 @@ +### 0.13.11 [2020.09.29] +* Allow building with `template-haskell-2.17.0.0` (GHC 9.0). +* Define `Quote` instances for `ReaderT`, `StateT`, `WriterT`, and `RWST`. In + order to define these instances on as many versions of `template-haskell` as + possible, this library now depends on the `th-compat` library, which + backports the `Quote` class to older versions of `template-haskell`. +* Backport the `Semigroup`, `Monoid`, and `MonadFix` instances for `Q` that + were introduced in `template-haskell-2.17.0.0`. + ### 0.13.10 [2020.04.13] * Implement `liftTyped` in the `Lift Bytes` instance. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-orphans-0.13.10/src/Language/Haskell/TH/Instances.hs new/th-orphans-0.13.11/src/Language/Haskell/TH/Instances.hs --- old/th-orphans-0.13.10/src/Language/Haskell/TH/Instances.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/th-orphans-0.13.11/src/Language/Haskell/TH/Instances.hs 2001-09-09 03:46:40.000000000 +0200 @@ -57,15 +57,17 @@ -- collisions of orphans between @th-orphans@ and @th-lift-instances@. module Language.Haskell.TH.Instances () where -import Language.Haskell.TH +import Language.Haskell.TH hiding (newName) import Language.Haskell.TH.Instances.Internal import Language.Haskell.TH.Lift (deriveLiftMany) import Language.Haskell.TH.ReifyMany -import Language.Haskell.TH.Syntax +import Language.Haskell.TH.Syntax hiding (newName) +import Language.Haskell.TH.Syntax.Compat (Quote(..)) import Control.Monad.Reader (ReaderT(ReaderT), runReaderT) import Control.Monad.RWS (RWST(RWST), runRWST) import Control.Monad.State (StateT(StateT), runStateT) +import qualified Control.Monad.Trans as Trans (MonadTrans(lift)) import Control.Monad.Writer (WriterT(WriterT), runWriterT) import Instances.TH.Lift () @@ -97,7 +99,7 @@ # endif # if !(MIN_VERSION_base(4,8,0)) -import Data.Monoid (Monoid) +import Data.Monoid (Monoid (..)) # endif # if MIN_VERSION_template_haskell(2,3,0) && defined(LANGUAGE_DeriveDataTypeable) @@ -120,9 +122,24 @@ #if MIN_VERSION_template_haskell(2,16,0) import GHC.Ptr (Ptr(Ptr)) import GHC.ForeignPtr (newForeignPtr_) +import Language.Haskell.TH.Syntax.Compat (liftTypedFromUntypedSplice) import System.IO.Unsafe (unsafePerformIO) #endif +#if !MIN_VERSION_template_haskell(2,17,0) +import Control.Applicative (liftA2) +import Control.Concurrent.MVar (newEmptyMVar, putMVar, readMVar) +import Control.Monad.Fix (MonadFix (..)) +import System.IO.Unsafe (unsafeInterleaveIO) + +import qualified Data.Semigroup as Semi + +# if MIN_VERSION_base(4,11,0) +import Control.Exception (throwIO, catch) +import GHC.IO.Exception (BlockedIndefinitelyOnMVar (..), FixIOException (..)) +# endif +#endif + #if !MIN_VERSION_template_haskell(2,11,0) deriving instance Show NameFlavour deriving instance Show NameSpace @@ -386,18 +403,26 @@ deriving instance Bounded Extension #endif +instance Quote m => Quote (ReaderT r m) where + newName = Trans.lift . newName $(deriveQuasiTrans [t| forall r m. Quasi m => Proxy2 (ReaderT r m) |] [e| \m1 m2 -> ReaderT $ \ r -> runReaderT m1 r `qRecover` runReaderT m2 r |]) +instance (Quote m, Monoid w) => Quote (WriterT w m) where + newName = Trans.lift . newName $(deriveQuasiTrans [t| forall w m. (Quasi m, Monoid w) => Proxy2 (WriterT w m) |] [e| \m1 m2 -> WriterT $ runWriterT m1 `qRecover` runWriterT m2 |]) +instance Quote m => Quote (StateT s m) where + newName = Trans.lift . newName $(deriveQuasiTrans [t| forall s m. Quasi m => Proxy2 (StateT s m) |] [e| \m1 m2 -> StateT $ \ s -> runStateT m1 s `qRecover` runStateT m2 s |]) +instance (Quote m, Monoid w) => Quote (RWST r w s m) where + newName = Trans.lift . newName $(deriveQuasiTrans [t| forall r w s m. (Quasi m, Monoid w) => Proxy2 (RWST r w s m) |] [e| \m1 m2 -> RWST $ \ r s -> runRWST m1 r s `qRecover` runRWST m2 r s |]) @@ -419,7 +444,35 @@ |] where size = bytesSize bytes - liftTyped = unsafeTExpCoerce . lift + liftTyped = liftTypedFromUntypedSplice +#endif + +#if !MIN_VERSION_template_haskell(2,17,0) +instance Semi.Semigroup a => Semi.Semigroup (Q a) where + (<>) = liftA2 (Semi.<>) + +instance Monoid a => Monoid (Q a) where + mempty = return mempty +#if !MIN_VERSION_base(4,11,0) + mappend = liftA2 mappend +#endif + +-- | If the function passed to 'mfix' inspects its argument, +-- the resulting action will throw a 'FixIOException' +-- (@base >=4.11@) or a 'BlockedIndefinitelyOnMVar' +-- with older @base@. +-- +instance MonadFix Q where + mfix k = do + m <- runIO newEmptyMVar + ans <- runIO (unsafeInterleaveIO (readMVar m +#if MIN_VERSION_base(4,11,0) + `catch` \BlockedIndefinitelyOnMVar -> throwIO FixIOException +#endif + )) + result <- k ans + runIO (putMVar m result) + return result #endif $(reifyManyWithoutInstances ''Lift [''Info, ''Loc] (const True) >>= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-orphans-0.13.10/th-orphans.cabal new/th-orphans-0.13.11/th-orphans.cabal --- old/th-orphans-0.13.10/th-orphans.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/th-orphans-0.13.11/th-orphans.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ name: th-orphans -version: 0.13.10 +version: 0.13.11 cabal-version: >= 1.10 build-type: Simple license: BSD3 @@ -20,8 +20,8 @@ , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5 - , GHC == 8.8.1 - , GHC == 8.10.1 + , GHC == 8.8.4 + , GHC == 8.10.2 synopsis: Orphan instances for TH datatypes description: Orphan instances for TH datatypes. In particular, instances for Ord and Lift, as well as a few missing Show / Eq. These @@ -31,7 +31,8 @@ library build-depends: base >= 4.3 && < 5, - template-haskell < 2.17, + template-haskell < 2.18, + th-compat >= 0.1 && < 0.2, -- https://github.com/mboes/th-lift/issues/14 th-lift >= 0.7.1, th-reify-many >= 0.1 && < 0.2, @@ -39,7 +40,8 @@ mtl if !impl(ghc >= 8.0) - build-depends: fail == 4.9.* + build-depends: fail == 4.9.*, + semigroups >= 0.18.5 && < 0.20 -- Use TH to derive Generics instances instead of DeriveGeneric, for < 7.10 if impl(ghc < 7.10) @@ -51,6 +53,8 @@ hs-source-dirs: src ghc-options: -Wall + if impl(ghc >= 8.6) + ghc-options: -Wno-star-is-type exposed-modules: Language.Haskell.TH.Instances other-modules: Language.Haskell.TH.Instances.Internal default-language: Haskell2010
