Hello community,

here is the log from the commit of package ghc-th-orphans for openSUSE:Factory 
checked in at 2019-10-18 14:35:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-th-orphans (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-th-orphans.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-th-orphans"

Fri Oct 18 14:35:15 2019 rev:8 rq:737223 version:0.13.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-th-orphans/ghc-th-orphans.changes    
2019-06-19 21:13:00.762778201 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-th-orphans.new.2352/ghc-th-orphans.changes  
2019-10-18 14:35:16.587951402 +0200
@@ -1,0 +2,17 @@
+Sun Sep 29 07:57:12 UTC 2019 - psim...@suse.com
+
+- Update th-orphans to version 0.13.9.
+  ### 0.13.9 [2019.09.28]
+  * Implement `qReifyType` (introduced in `template-haskell-2.16.0.0`) for the
+    `Quasi` instances defined in `th-orphans`.
+
+-------------------------------------------------------------------
+Fri Sep  6 06:34:54 UTC 2019 - psim...@suse.com
+
+- Update th-orphans to version 0.13.8.
+  ### 0.13.8 [2019.09.04]
+  * Backport the `Bounded` instance for `Extension`
+    (from `Language.Haskell.TH.LanguageExtensions`), which was introduced in
+    `template-haskell-2.15.0.0`.
+
+-------------------------------------------------------------------

Old:
----
  th-orphans-0.13.7.tar.gz
  th-orphans.cabal

New:
----
  th-orphans-0.13.9.tar.gz

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

Other differences:
------------------
++++++ ghc-th-orphans.spec ++++++
--- /var/tmp/diff_new_pack.VjY3jO/_old  2019-10-18 14:35:17.219949756 +0200
+++ /var/tmp/diff_new_pack.VjY3jO/_new  2019-10-18 14:35:17.219949756 +0200
@@ -19,14 +19,13 @@
 %global pkg_name th-orphans
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.13.7
+Version:        0.13.9
 Release:        0
 Summary:        Orphan instances for TH datatypes
 License:        BSD-3-Clause
 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-mtl-devel
 BuildRequires:  ghc-rpm-macros
@@ -57,7 +56,6 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ th-orphans-0.13.7.tar.gz -> th-orphans-0.13.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-orphans-0.13.7/CHANGELOG.md 
new/th-orphans-0.13.9/CHANGELOG.md
--- old/th-orphans-0.13.7/CHANGELOG.md  2019-03-25 02:07:45.000000000 +0100
+++ new/th-orphans-0.13.9/CHANGELOG.md  2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,12 @@
+### 0.13.9 [2019.09.28]
+* Implement `qReifyType` (introduced in `template-haskell-2.16.0.0`) for the
+  `Quasi` instances defined in `th-orphans`.
+
+### 0.13.8 [2019.09.04]
+* Backport the `Bounded` instance for `Extension`
+  (from `Language.Haskell.TH.LanguageExtensions`), which was introduced in
+  `template-haskell-2.15.0.0`.
+
 ### 0.13.7 [2019.03.24]
 * Backport the `MonadFail Q` instance.
 * Allow building with `template-haskell-2.16` by manually implementing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/th-orphans-0.13.7/src/Language/Haskell/TH/Instances/Internal.hs 
new/th-orphans-0.13.9/src/Language/Haskell/TH/Instances/Internal.hs
--- old/th-orphans-0.13.7/src/Language/Haskell/TH/Instances/Internal.hs 
1970-01-01 01:00:00.000000000 +0100
+++ new/th-orphans-0.13.9/src/Language/Haskell/TH/Instances/Internal.hs 
2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,99 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE TemplateHaskell #-}
+
+-- | Defines a utility function for deriving 'Quasi' instances for monad
+-- transformer data types.
+module Language.Haskell.TH.Instances.Internal
+  ( deriveQuasiTrans
+  , Proxy2
+  ) where
+
+import qualified Control.Monad.Trans as MTL (lift)
+import Language.Haskell.TH.Lib
+import Language.Haskell.TH.Ppr (pprint)
+import Language.Haskell.TH.Syntax
+
+deriveQuasiTrans ::
+     Q Type  -- ^ The instance head. For example, this might be of the form:
+             --
+             --   > [t| forall r m. Quasi m => Proxy2 (ReaderT r m) |]
+             --
+             --   Why use 'Proxy2' instead of 'Quasi'? Sadly, GHC 7.0/7.2 will
+             --   not accept it if you use the latter due to old TH bugs, so we
+             --   use 'Proxy2' as an ugly workaround.
+  -> Q Exp   -- ^ The implementation of 'qRecover'
+  -> Q [Dec] -- ^ The 'Quasi' instance declaration
+deriveQuasiTrans qInstHead qRecoverExpr = do
+  instHead    <- qInstHead
+  let (instCxt, mangledInstTy) = decomposeType instHead
+      qInstCxt = return instCxt
+      qInstTy  = case mangledInstTy of
+                   ConT proxy2 `AppT` instTy
+                     |  proxy2 == ''Proxy2
+                     -> conT ''Quasi `appT` return instTy
+                   _ -> fail $ "Unexpected type " ++ pprint mangledInstTy
+  instDec <- instanceD qInstCxt qInstTy qInstMethDecs
+  return [instDec]
+  where
+    decomposeType :: Type -> (Cxt, Type)
+    decomposeType (ForallT _tvbs ctxt ty) = (ctxt, ty)
+    decomposeType ty                      = ([],   ty)
+
+    qInstMethDecs :: [Q Dec]
+    qInstMethDecs =
+      let instMeths :: [(Name, Q Exp)]
+          instMeths =
+            [ -- qRecover is different for each instance
+              ('qRecover,            qRecoverExpr)
+
+              -- The remaining methods are straightforward
+            , ('qNewName,            [| MTL.lift . qNewName |])
+            , ('qReport,             [| \a b -> MTL.lift $ qReport a b |])
+            , ('qReify,              [| MTL.lift . qReify |])
+            , ('qLocation,           [| MTL.lift qLocation |])
+            , ('qRunIO,              [| MTL.lift . qRunIO |])
+#if MIN_VERSION_template_haskell(2,7,0)
+            , ('qReifyInstances,     [| \a b -> MTL.lift $ qReifyInstances a b 
|])
+            , ('qLookupName,         [| \a b -> MTL.lift $ qLookupName a b |])
+            , ('qAddDependentFile,   [| MTL.lift . qAddDependentFile |])
+# if MIN_VERSION_template_haskell(2,9,0)
+            , ('qReifyRoles,         [| MTL.lift . qReifyRoles |])
+            , ('qReifyAnnotations,   [| MTL.lift . qReifyAnnotations |])
+            , ('qReifyModule,        [| MTL.lift . qReifyModule |])
+            , ('qAddTopDecls,        [| MTL.lift . qAddTopDecls |])
+            , ('qAddModFinalizer,    [| MTL.lift . qAddModFinalizer |])
+            , ('qGetQ,               [| MTL.lift qGetQ |])
+            , ('qPutQ,               [| MTL.lift . qPutQ |])
+# endif
+# if MIN_VERSION_template_haskell(2,11,0)
+            , ('qReifyFixity,        [| MTL.lift . qReifyFixity |])
+            , ('qReifyConStrictness, [| MTL.lift . qReifyConStrictness |])
+            , ('qIsExtEnabled,       [| MTL.lift . qIsExtEnabled |])
+            , ('qExtsEnabled,        [| MTL.lift qExtsEnabled |])
+# endif
+#elif MIN_VERSION_template_haskell(2,5,0)
+            , ('qClassInstances,     [| \a b -> MTL.lift $ qClassInstances a b 
|])
+#endif
+#if MIN_VERSION_template_haskell(2,14,0)
+            , ('qAddForeignFilePath, [| \a b -> MTL.lift $ qAddForeignFilePath 
a b |])
+            , ('qAddTempFile,        [| MTL.lift . qAddTempFile |])
+#elif MIN_VERSION_template_haskell(2,12,0)
+            , ('qAddForeignFile,     [| \a b -> MTL.lift $ qAddForeignFile a b 
|])
+#endif
+#if MIN_VERSION_template_haskell(2,13,0)
+            , ('qAddCorePlugin,      [| MTL.lift . qAddCorePlugin |])
+#endif
+#if MIN_VERSION_template_haskell(2,16,0)
+            , ('qReifyType,          [| MTL.lift . qReifyType |])
+#endif
+            ]
+
+          mkDec :: Name -> Q Exp -> Q Dec
+          mkDec methName methRhs = valD (varP methName) (normalB methRhs) []
+
+      in map (uncurry mkDec) instMeths
+
+-- | See the Haddocks for 'deriveQuasiTrans' for an explanation of why this
+-- type needs to exist.
+data Proxy2 (m :: * -> *)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/th-orphans-0.13.7/src/Language/Haskell/TH/Instances.hs 
new/th-orphans-0.13.9/src/Language/Haskell/TH/Instances.hs
--- old/th-orphans-0.13.7/src/Language/Haskell/TH/Instances.hs  2019-03-25 
02:07:45.000000000 +0100
+++ new/th-orphans-0.13.9/src/Language/Haskell/TH/Instances.hs  2001-09-09 
03:46:40.000000000 +0200
@@ -58,6 +58,7 @@
 module Language.Haskell.TH.Instances () where
 
 import Language.Haskell.TH
+import Language.Haskell.TH.Instances.Internal
 import Language.Haskell.TH.Lift (deriveLiftMany)
 import Language.Haskell.TH.ReifyMany
 import Language.Haskell.TH.Syntax
@@ -67,13 +68,16 @@
 import Control.Monad.RWS (RWST(RWST), runRWST)
 import Control.Monad.State (StateT(StateT), runStateT)
 import Control.Monad.Writer (WriterT(WriterT), runWriterT)
-import qualified Control.Monad.Trans as MTL (lift)
 import Instances.TH.Lift ()
 
 #if !(MIN_VERSION_template_haskell(2,8,0))
 import Unsafe.Coerce (unsafeCoerce)
 #endif
 
+#if MIN_VERSION_template_haskell(2,11,0) && 
!(MIN_VERSION_template_haskell(2,15,0))
+import Language.Haskell.TH.LanguageExtensions (Extension(..))
+#endif
+
 -- Thanks to Richard Eisenberg, GHC 7.10 adds many of the instances
 -- from this module.
 #if !MIN_VERSION_template_haskell(2,10,0)
@@ -387,161 +391,25 @@
 # endif
 #endif
 
-instance Quasi m => Quasi (ReaderT r m) where
-  qNewName                = MTL.lift . qNewName
-  qReport a b             = MTL.lift $ qReport a b
-  qRecover m1 m2          = ReaderT $ \ r -> runReaderT m1 r `qRecover` 
runReaderT m2 r
-  qReify                  = MTL.lift . qReify
-  qLocation               = MTL.lift qLocation
-  qRunIO                  = MTL.lift . qRunIO
-#if MIN_VERSION_template_haskell(2,7,0)
-  qReifyInstances a b     = MTL.lift $ qReifyInstances a b
-  qLookupName a b         = MTL.lift $ qLookupName a b
-  qAddDependentFile       = MTL.lift . qAddDependentFile
-# if MIN_VERSION_template_haskell(2,9,0)
-  qReifyRoles             = MTL.lift . qReifyRoles
-  qReifyAnnotations       = MTL.lift . qReifyAnnotations
-  qReifyModule            = MTL.lift . qReifyModule
-  qAddTopDecls            = MTL.lift . qAddTopDecls
-  qAddModFinalizer        = MTL.lift . qAddModFinalizer
-  qGetQ                   = MTL.lift qGetQ
-  qPutQ                   = MTL.lift . qPutQ
-# endif
-# if MIN_VERSION_template_haskell(2,11,0)
-  qReifyFixity            = MTL.lift . qReifyFixity
-  qReifyConStrictness     = MTL.lift . qReifyConStrictness
-  qIsExtEnabled           = MTL.lift . qIsExtEnabled
-  qExtsEnabled            = MTL.lift qExtsEnabled
-# endif
-#elif MIN_VERSION_template_haskell(2,5,0)
-  qClassInstances a b     = MTL.lift $ qClassInstances a b
-#endif
-#if MIN_VERSION_template_haskell(2,14,0)
-  qAddForeignFilePath a b = MTL.lift $ qAddForeignFilePath a b
-  qAddTempFile            = MTL.lift . qAddTempFile
-#elif MIN_VERSION_template_haskell(2,12,0)
-  qAddForeignFile a b     = MTL.lift $ qAddForeignFile a b
-#endif
-#if MIN_VERSION_template_haskell(2,13,0)
-  qAddCorePlugin          = MTL.lift . qAddCorePlugin
+#if MIN_VERSION_template_haskell(2,11,0) && 
!(MIN_VERSION_template_haskell(2,15,0))
+deriving instance Bounded Extension
 #endif
 
-instance (Quasi m, Monoid w) => Quasi (WriterT w m) where
-  qNewName                = MTL.lift . qNewName
-  qReport a b             = MTL.lift $ qReport a b
-  qRecover m1 m2          = WriterT $ runWriterT m1 `qRecover` runWriterT m2
-  qReify                  = MTL.lift . qReify
-  qLocation               = MTL.lift qLocation
-  qRunIO                  = MTL.lift . qRunIO
-#if MIN_VERSION_template_haskell(2,7,0)
-  qReifyInstances a b     = MTL.lift $ qReifyInstances a b
-  qLookupName a b         = MTL.lift $ qLookupName a b
-  qAddDependentFile       = MTL.lift . qAddDependentFile
-# if MIN_VERSION_template_haskell(2,9,0)
-  qReifyRoles             = MTL.lift . qReifyRoles
-  qReifyAnnotations       = MTL.lift . qReifyAnnotations
-  qReifyModule            = MTL.lift . qReifyModule
-  qAddTopDecls            = MTL.lift . qAddTopDecls
-  qAddModFinalizer        = MTL.lift . qAddModFinalizer
-  qGetQ                   = MTL.lift qGetQ
-  qPutQ                   = MTL.lift . qPutQ
-# endif
-# if MIN_VERSION_template_haskell(2,11,0)
-  qReifyFixity            = MTL.lift . qReifyFixity
-  qReifyConStrictness     = MTL.lift . qReifyConStrictness
-  qIsExtEnabled           = MTL.lift . qIsExtEnabled
-  qExtsEnabled            = MTL.lift qExtsEnabled
-# endif
-#elif MIN_VERSION_template_haskell(2,5,0)
-  qClassInstances a b     = MTL.lift $ qClassInstances a b
-#endif
-#if MIN_VERSION_template_haskell(2,14,0)
-  qAddForeignFilePath a b = MTL.lift $ qAddForeignFilePath a b
-  qAddTempFile            = MTL.lift . qAddTempFile
-#elif MIN_VERSION_template_haskell(2,12,0)
-  qAddForeignFile a b     = MTL.lift $ qAddForeignFile a b
-#endif
-#if MIN_VERSION_template_haskell(2,13,0)
-  qAddCorePlugin          = MTL.lift . qAddCorePlugin
-#endif
+$(deriveQuasiTrans
+    [t| forall r m. Quasi m => Proxy2 (ReaderT r m) |]
+    [e| \m1 m2 -> ReaderT $ \ r -> runReaderT m1 r `qRecover` runReaderT m2 r 
|])
 
-instance Quasi m => Quasi (StateT s m) where
-  qNewName                = MTL.lift . qNewName
-  qReport a b             = MTL.lift $ qReport a b
-  qRecover m1 m2          = StateT $ \ s -> runStateT m1 s `qRecover` 
runStateT m2 s
-  qReify                  = MTL.lift . qReify
-  qLocation               = MTL.lift qLocation
-  qRunIO                  = MTL.lift . qRunIO
-#if MIN_VERSION_template_haskell(2,7,0)
-  qReifyInstances a b     = MTL.lift $ qReifyInstances a b
-  qLookupName a b         = MTL.lift $ qLookupName a b
-  qAddDependentFile       = MTL.lift . qAddDependentFile
-# if MIN_VERSION_template_haskell(2,9,0)
-  qReifyRoles             = MTL.lift . qReifyRoles
-  qReifyAnnotations       = MTL.lift . qReifyAnnotations
-  qReifyModule            = MTL.lift . qReifyModule
-  qAddTopDecls            = MTL.lift . qAddTopDecls
-  qAddModFinalizer        = MTL.lift . qAddModFinalizer
-  qGetQ                   = MTL.lift qGetQ
-  qPutQ                   = MTL.lift . qPutQ
-# endif
-# if MIN_VERSION_template_haskell(2,11,0)
-  qReifyFixity            = MTL.lift . qReifyFixity
-  qReifyConStrictness     = MTL.lift . qReifyConStrictness
-  qIsExtEnabled           = MTL.lift . qIsExtEnabled
-  qExtsEnabled            = MTL.lift qExtsEnabled
-# endif
-#elif MIN_VERSION_template_haskell(2,5,0)
-  qClassInstances a b     = MTL.lift $ qClassInstances a b
-#endif
-#if MIN_VERSION_template_haskell(2,14,0)
-  qAddForeignFilePath a b = MTL.lift $ qAddForeignFilePath a b
-  qAddTempFile            = MTL.lift . qAddTempFile
-#elif MIN_VERSION_template_haskell(2,12,0)
-  qAddForeignFile a b     = MTL.lift $ qAddForeignFile a b
-#endif
-#if MIN_VERSION_template_haskell(2,13,0)
-  qAddCorePlugin          = MTL.lift . qAddCorePlugin
-#endif
+$(deriveQuasiTrans
+    [t| forall w m. (Quasi m, Monoid w) => Proxy2 (WriterT w m) |]
+    [e| \m1 m2 -> WriterT $ runWriterT m1 `qRecover` runWriterT m2 |])
 
-instance (Quasi m, Monoid w) => Quasi (RWST r w s m) where
-  qNewName                = MTL.lift . qNewName
-  qReport a b             = MTL.lift $ qReport a b
-  qRecover m1 m2          = RWST $ \ r s -> runRWST m1 r s `qRecover` runRWST 
m2 r s
-  qReify                  = MTL.lift . qReify
-  qLocation               = MTL.lift qLocation
-  qRunIO                  = MTL.lift . qRunIO
-#if MIN_VERSION_template_haskell(2,7,0)
-  qReifyInstances a b     = MTL.lift $ qReifyInstances a b
-  qLookupName a b         = MTL.lift $ qLookupName a b
-  qAddDependentFile       = MTL.lift . qAddDependentFile
-# if MIN_VERSION_template_haskell(2,9,0)
-  qReifyRoles             = MTL.lift . qReifyRoles
-  qReifyAnnotations       = MTL.lift . qReifyAnnotations
-  qReifyModule            = MTL.lift . qReifyModule
-  qAddTopDecls            = MTL.lift . qAddTopDecls
-  qAddModFinalizer        = MTL.lift . qAddModFinalizer
-  qGetQ                   = MTL.lift qGetQ
-  qPutQ                   = MTL.lift . qPutQ
-# endif
-# if MIN_VERSION_template_haskell(2,11,0)
-  qReifyFixity            = MTL.lift . qReifyFixity
-  qReifyConStrictness     = MTL.lift . qReifyConStrictness
-  qIsExtEnabled           = MTL.lift . qIsExtEnabled
-  qExtsEnabled            = MTL.lift qExtsEnabled
-# endif
-#elif MIN_VERSION_template_haskell(2,5,0)
-  qClassInstances a b     = MTL.lift $ qClassInstances a b
-#endif
-#if MIN_VERSION_template_haskell(2,14,0)
-  qAddForeignFilePath a b = MTL.lift $ qAddForeignFilePath a b
-  qAddTempFile            = MTL.lift . qAddTempFile
-#elif MIN_VERSION_template_haskell(2,12,0)
-  qAddForeignFile a b     = MTL.lift $ qAddForeignFile a b
-#endif
-#if MIN_VERSION_template_haskell(2,13,0)
-  qAddCorePlugin          = MTL.lift . qAddCorePlugin
-#endif
+$(deriveQuasiTrans
+    [t| forall s m. Quasi m => Proxy2 (StateT s m) |]
+    [e| \m1 m2 -> StateT $ \ s -> runStateT m1 s `qRecover` runStateT m2 s |])
+
+$(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 |])
 
 #if MIN_VERSION_base(4,7,0) && defined(LANGUAGE_DeriveDataTypeable) && 
__GLASGOW_HASKELL__ < 710
 deriving instance Typeable Lift
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-orphans-0.13.7/th-orphans.cabal 
new/th-orphans-0.13.9/th-orphans.cabal
--- old/th-orphans-0.13.7/th-orphans.cabal      2019-03-25 02:07:45.000000000 
+0100
+++ new/th-orphans-0.13.9/th-orphans.cabal      2001-09-09 03:46:40.000000000 
+0200
@@ -1,13 +1,13 @@
 name:               th-orphans
-version:            0.13.7
+version:            0.13.9
 cabal-version:      >= 1.10
 build-type:         Simple
 license:            BSD3
 license-file:       LICENSE
 category:           Template Haskell
-author:             Matt Morrow
-copyright:          (c) Matt Morrow
-maintainer:         Michael Sloan <mgsloan at gmail>
+author:             Matt Morrow, Michael Sloan, Ryan Scott
+copyright:          (c) Matt Morrow, Michael Sloan, Ryan Scott
+maintainer:         Ryan Scott <ryan.gl.sc...@gmail.com>
 bug-reports:        https://github.com/mgsloan/th-orphans/issues
 stability:          experimental
 tested-with:        GHC == 7.0.4
@@ -19,7 +19,8 @@
                   , GHC == 8.0.2
                   , GHC == 8.2.2
                   , GHC == 8.4.4
-                  , GHC == 8.6.4
+                  , GHC == 8.6.5
+                  , GHC == 8.8.1
 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
@@ -29,7 +30,7 @@
 
 library
   build-depends:      base >= 4.3 && < 5,
-                      template-haskell < 2.15,
+                      template-haskell < 2.16,
                       -- https://github.com/mboes/th-lift/issues/14
                       th-lift >= 0.7.1,
                       th-reify-many >= 0.1 && < 0.2,
@@ -50,6 +51,7 @@
   hs-source-dirs:     src
   ghc-options:        -Wall
   exposed-modules:    Language.Haskell.TH.Instances
+  other-modules:      Language.Haskell.TH.Instances.Internal
   default-language:   Haskell2010
 
 test-suite test


Reply via email to