Hello community,

here is the log from the commit of package ghc-th-orphans for 
openSUSE:Leap:15.2 checked in at 2020-02-19 18:41:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ghc-th-orphans (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ghc-th-orphans.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-th-orphans"

Wed Feb 19 18:41:43 2020 rev:13 rq:771492 version:0.13.9

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/ghc-th-orphans/ghc-th-orphans.changes  
2020-01-15 15:02:41.569818480 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.ghc-th-orphans.new.26092/ghc-th-orphans.changes   
    2020-02-19 18:41:44.222229067 +0100
@@ -1,0 +2,38 @@
+Fri Nov  8 16:14:59 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------
+Sun Sep 29 07:57:12 UTC 2019 - [email protected]
+
+- 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 - [email protected]
+
+- 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`.
+
+-------------------------------------------------------------------
+Tue Jun 11 14:29:20 UTC 2019 - Peter Simons <[email protected]>
+
+- Update Cabal file for more accurate build dependencies.
+
+-------------------------------------------------------------------
+Mon Mar 25 11:50:15 UTC 2019 - [email protected]
+
+- Update th-orphans to version 0.13.7.
+  ### 0.13.7 [2019.03.24]
+  * Backport the `MonadFail Q` instance.
+  * Allow building with `template-haskell-2.16` by manually implementing
+    `Lift` for `Bytes`. See [#27]
+
+  [#27]: https://github.com/mgsloan/th-orphans/issues/27
+
+-------------------------------------------------------------------

Old:
----
  th-orphans-0.13.6.tar.gz

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

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

Other differences:
------------------
++++++ ghc-th-orphans.spec ++++++
--- /var/tmp/diff_new_pack.XeXC9J/_old  2020-02-19 18:41:44.578229504 +0100
+++ /var/tmp/diff_new_pack.XeXC9J/_new  2020-02-19 18:41:44.582229509 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-th-orphans
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,13 @@
 %global pkg_name th-orphans
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.13.6
+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
@@ -34,6 +34,7 @@
 BuildRequires:  ghc-th-lift-instances-devel
 BuildRequires:  ghc-th-reify-many-devel
 %if %{with tests}
+BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-hspec-devel
 %endif
 
@@ -44,7 +45,6 @@
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
-Group:          Development/Libraries/Haskell
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}
@@ -55,6 +55,7 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ th-orphans-0.13.6.tar.gz -> th-orphans-0.13.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-orphans-0.13.6/CHANGELOG.md 
new/th-orphans-0.13.9/CHANGELOG.md
--- old/th-orphans-0.13.6/CHANGELOG.md  2018-07-01 13:48:49.000000000 +0200
+++ new/th-orphans-0.13.9/CHANGELOG.md  2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,19 @@
+### 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
+  `Lift` for `Bytes`. See [#27]
+
+[#27]: https://github.com/mgsloan/th-orphans/issues/27
+
 ### 0.13.6 [2018.07.01]
 * Allow building with `template-haskell-2.14`.
 * Implement `qAddForeignFilePath` and `qAddTempFile` for `Quasi` instances
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/th-orphans-0.13.6/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.6/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.6/src/Language/Haskell/TH/Instances.hs 
new/th-orphans-0.13.9/src/Language/Haskell/TH/Instances.hs
--- old/th-orphans-0.13.6/src/Language/Haskell/TH/Instances.hs  2018-07-01 
13:48:49.000000000 +0200
+++ new/th-orphans-0.13.9/src/Language/Haskell/TH/Instances.hs  2001-09-09 
03:46:40.000000000 +0200
@@ -1,4 +1,5 @@
 {-# LANGUAGE CPP #-}
+{-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TypeSynonymInstances #-}
 {-# LANGUAGE TemplateHaskell #-}
@@ -57,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
@@ -66,9 +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)
@@ -108,9 +117,36 @@
 # endif
 #endif
 
+#if !(MIN_VERSION_template_haskell(2,11,0))
+import qualified Control.Monad.Fail as Fail
+#endif
+
+-- TODO: Once GHC 8.10 is released, this should be updated to use the
+-- proper template haskell version.  Other related usages of this #if
+-- should be replaced as well (and do not have a TODO like this).
+--
+-- #if MIN_VERSION_template_haskell(2,16,0)
+#if __GLASGOW_HASKELL__ >= 809
+import GHC.Ptr (Ptr(Ptr))
+import GHC.ForeignPtr (newForeignPtr_)
+import System.IO.Unsafe (unsafePerformIO)
+#endif
+
 #if !MIN_VERSION_template_haskell(2,11,0)
 deriving instance Show NameFlavour
 deriving instance Show NameSpace
+
+instance Fail.MonadFail Q where
+  fail s = report True s >> q (fail "Q monad failure")
+    where
+      q :: (forall m. Quasi m => m a) -> Q a
+# if MIN_VERSION_template_haskell(2,8,0)
+      q = Q
+# else
+      -- Early versions of template-haskell did not expose Q's newtype
+      -- constructor. Desperate times call for desperate measures.
+      q = unsafeCoerce
+# endif
 #endif
 
 -- Ideally, it'd be possible to use reifyManyWithoutInstances for
@@ -355,167 +391,44 @@
 # 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
-#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
-
-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
-
-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
+#if MIN_VERSION_template_haskell(2,11,0) && 
!(MIN_VERSION_template_haskell(2,15,0))
+deriving instance Bounded Extension
 #endif
 
+$(deriveQuasiTrans
+    [t| forall r m. Quasi m => Proxy2 (ReaderT r m) |]
+    [e| \m1 m2 -> ReaderT $ \ r -> runReaderT m1 r `qRecover` runReaderT m2 r 
|])
+
+$(deriveQuasiTrans
+    [t| forall w m. (Quasi m, Monoid w) => Proxy2 (WriterT w m) |]
+    [e| \m1 m2 -> WriterT $ runWriterT m1 `qRecover` runWriterT m2 |])
+
+$(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
 deriving instance Typeable Ppr
 deriving instance Typeable Quasi
 #endif
 
+#if __GLASGOW_HASKELL__ >= 809
+instance Lift Bytes where
+  lift bytes =
+    [| Bytes
+      { bytesPtr = unsafePerformIO $ newForeignPtr_ (Ptr $(litE (BytesPrimL 
bytes)))
+      , bytesOffset = 0
+      , bytesSize = size
+      }
+    |]
+    where
+      size = bytesSize bytes
+#endif
+
 $(reifyManyWithoutInstances ''Lift [''Info, ''Loc] (const True) >>=
   deriveLiftMany)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-orphans-0.13.6/test/Spec.hs 
new/th-orphans-0.13.9/test/Spec.hs
--- old/th-orphans-0.13.6/test/Spec.hs  2018-07-01 13:48:49.000000000 +0200
+++ new/th-orphans-0.13.9/test/Spec.hs  2001-09-09 03:46:40.000000000 +0200
@@ -1,9 +1,15 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE TemplateHaskell #-}
 
+import Control.Exception (evaluate)
 import Language.Haskell.TH
 import Language.Haskell.TH.Instances
+import Language.Haskell.TH.Lift
 import System.Timeout
-import Test.Hspec
+import System.Mem
+import Test.Hspec hiding (runIO)
+import TestUtil
+import qualified Data.ByteString as BS
 
 main :: IO ()
 main = hspec $ do
@@ -19,3 +25,16 @@
     it "Compares types correctly" $
         compare (AppT (ConT ''Maybe) (ConT ''Int)) (AppT (ConT ''Maybe) (ConT 
''Char))
             `shouldBe` GT
+#if __GLASGOW_HASKELL__ >= 809
+    it "Lifts bytes" $ do
+        let addr = $(do
+                let result = $(do
+                        ast <- lift (LitE (BytesPrimL (bsToBytes testBytes)))
+                        runIO performMajorGC
+                        return ast)
+                runIO $ evaluate result
+                runIO performMajorGC
+                return result)
+        bs <- addrToBs addr (BS.length testBytes)
+        bs `shouldBe` testBytes
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-orphans-0.13.6/test/TestUtil.hs 
new/th-orphans-0.13.9/test/TestUtil.hs
--- old/th-orphans-0.13.6/test/TestUtil.hs      1970-01-01 01:00:00.000000000 
+0100
+++ new/th-orphans-0.13.9/test/TestUtil.hs      2001-09-09 03:46:40.000000000 
+0200
@@ -0,0 +1,38 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+module TestUtil where
+
+#if __GLASGOW_HASKELL__ >= 809
+
+import Language.Haskell.TH.Syntax
+import qualified Data.ByteString as BS
+import qualified Data.ByteString.Internal as BS
+import GHC.Prim (Addr#)
+import GHC.ForeignPtr (newForeignPtr_)
+import GHC.Ptr (Ptr(Ptr))
+
+testBytes :: BS.ByteString
+testBytes =
+  "test bytes " <>
+  (BS.take (len - 2) $ BS.drop 1 $ BS.replicate len 42)
+  where
+    len = 20 * 1024 * 1024
+
+bsToBytes :: BS.ByteString -> Bytes
+bsToBytes bs =
+  Bytes
+    { bytesPtr = fp
+    , bytesOffset = fromIntegral offset
+    , bytesSize = fromIntegral size
+    }
+  where
+    (fp, offset, size) = BS.toForeignPtr bs
+
+addrToBs :: Addr# -> Int -> IO BS.ByteString
+addrToBs addr len = do
+  fp <- newForeignPtr_ (Ptr addr)
+  return $ BS.fromForeignPtr fp 0 len
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-orphans-0.13.6/th-orphans.cabal 
new/th-orphans-0.13.9/th-orphans.cabal
--- old/th-orphans-0.13.6/th-orphans.cabal      2018-07-01 13:48:49.000000000 
+0200
+++ 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.6
+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 <[email protected]>
 bug-reports:        https://github.com/mgsloan/th-orphans/issues
 stability:          experimental
 tested-with:        GHC == 7.0.4
@@ -18,8 +18,9 @@
                   , GHC == 7.10.3
                   , GHC == 8.0.2
                   , GHC == 8.2.2
-                  , GHC == 8.4.3
-                  , GHC == 8.6.1
+                  , GHC == 8.4.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,13 +30,16 @@
 
 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,
                       th-lift-instances,
                       mtl
 
+  if !impl(ghc >= 8.0)
+    build-depends:    fail == 4.9.*
+
   -- Use TH to derive Generics instances instead of DeriveGeneric, for < 7.10
   if impl(ghc < 7.10)
     build-depends:    generic-deriving >= 1.9
@@ -47,16 +51,21 @@
   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
   type:               exitcode-stdio-1.0
   hs-source-dirs:     test
   main-is:            Spec.hs
+  other-modules:      TestUtil
   build-depends:      base,
-                      th-orphans,
+                      bytestring,
+                      ghc-prim,
                       hspec,
-                      template-haskell
+                      template-haskell,
+                      th-lift,
+                      th-orphans
   build-tool-depends: hspec-discover:hspec-discover
   default-language:   Haskell2010
 

++++++ th-orphans.cabal ++++++
name:               th-orphans
version:            0.13.9
x-revision: 1
cabal-version:      >= 1.10
build-type:         Simple
license:            BSD3
license-file:       LICENSE
category:           Template Haskell
author:             Matt Morrow, Michael Sloan, Ryan Scott
copyright:          (c) Matt Morrow, Michael Sloan, Ryan Scott
maintainer:         Ryan Scott <[email protected]>
bug-reports:        https://github.com/mgsloan/th-orphans/issues
stability:          experimental
tested-with:        GHC == 7.0.4
                  , GHC == 7.2.2
                  , GHC == 7.4.2
                  , GHC == 7.6.3
                  , GHC == 7.8.4
                  , GHC == 7.10.3
                  , GHC == 8.0.2
                  , GHC == 8.2.2
                  , GHC == 8.4.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
                    instances used to live in haskell-src-meta, and that's where
                    the version number started.
extra-source-files: CHANGELOG.md, README.md

library
  build-depends:      base >= 4.3 && < 5,
                      template-haskell < 2.17,
                      -- https://github.com/mboes/th-lift/issues/14
                      th-lift >= 0.7.1,
                      th-reify-many >= 0.1 && < 0.2,
                      th-lift-instances,
                      mtl

  if !impl(ghc >= 8.0)
    build-depends:    fail == 4.9.*

  -- Use TH to derive Generics instances instead of DeriveGeneric, for < 7.10
  if impl(ghc < 7.10)
    build-depends:    generic-deriving >= 1.9

  -- Prior to GHC 7.6, GHC generics lived in ghc-prim
  if impl(ghc >= 7.2) && impl(ghc < 7.6)
    build-depends:    ghc-prim

  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
  type:               exitcode-stdio-1.0
  hs-source-dirs:     test
  main-is:            Spec.hs
  other-modules:      TestUtil
  build-depends:      base,
                      bytestring,
                      ghc-prim,
                      hspec,
                      template-haskell,
                      th-lift,
                      th-orphans
  build-tool-depends: hspec-discover:hspec-discover
  default-language:   Haskell2010

source-repository head
  type:     git
  location: https://github.com/mgsloan/th-orphans

Reply via email to