Hello community,

here is the log from the commit of package ghc-th-data-compat for 
openSUSE:Factory checked in at 2017-07-23 12:15:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-th-data-compat (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-th-data-compat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-th-data-compat"

Sun Jul 23 12:15:19 2017 rev:2 rq:511923 version:0.0.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-th-data-compat/ghc-th-data-compat.changes    
2017-01-18 21:32:46.657204428 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-th-data-compat.new/ghc-th-data-compat.changes   
    2017-07-23 12:15:22.971413514 +0200
@@ -1,0 +2,5 @@
+Mon Jul 17 03:01:30 UTC 2017 - [email protected]
+
+- Update to version 0.0.2.4.
+
+-------------------------------------------------------------------

Old:
----
  th-data-compat-0.0.2.2.tar.gz

New:
----
  th-data-compat-0.0.2.4.tar.gz

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

Other differences:
------------------
++++++ ghc-th-data-compat.spec ++++++
--- /var/tmp/diff_new_pack.M9VS9N/_old  2017-07-23 12:15:24.139248551 +0200
+++ /var/tmp/diff_new_pack.M9VS9N/_new  2017-07-23 12:15:24.143247987 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-th-data-compat
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -18,19 +18,17 @@
 
 %global pkg_name th-data-compat
 Name:           ghc-%{pkg_name}
-Version:        0.0.2.2
+Version:        0.0.2.4
 Release:        0
 Summary:        Compatibility for data definition template of TH
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-template-haskell-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 This package contains wrapped name definitions of data definition template.
@@ -49,15 +47,12 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ th-data-compat-0.0.2.2.tar.gz -> th-data-compat-0.0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/th-data-compat-0.0.2.2/src/Language/Haskell/TH/Compat/Data/Current.hs 
new/th-data-compat-0.0.2.4/src/Language/Haskell/TH/Compat/Data/Current.hs
--- old/th-data-compat-0.0.2.2/src/Language/Haskell/TH/Compat/Data/Current.hs   
2016-06-19 14:37:50.000000000 +0200
+++ new/th-data-compat-0.0.2.4/src/Language/Haskell/TH/Compat/Data/Current.hs   
2017-07-15 03:51:20.000000000 +0200
@@ -10,54 +10,62 @@
   (CxtQ, ConQ, TypeQ, DecQ,
    Cxt, Con, Type, Name, TyVarBndr, Kind,
    Dec (DataD, NewtypeD, DataInstD, NewtypeInstD, InstanceD),
-   dataD, newtypeD, dataInstD, newtypeInstD, conT)
+   DerivClauseQ, DerivClause (..), Pred,
+   dataD, newtypeD, dataInstD, newtypeInstD, derivClause, conT)
 
 
+derivesFromNames :: [Name] -> [DerivClauseQ]
+derivesFromNames ns = [derivClause Nothing $ map conT ns]
+
+unDerivClause :: DerivClause -> [Pred]
+unDerivClause (DerivClause _ ps) = ps
+
 -- | Definition against 'dataD',
 --   compatible with before temaplate-haskell-2.11
 dataD' :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name]
        -> DecQ
-dataD' cxt n bs cs ds = dataD cxt n bs Nothing cs $ mapM conT ds
+dataD' cxt n bs cs ds = dataD cxt n bs Nothing cs $ derivesFromNames ds
 
 -- | Compatible interface to destruct 'DataD'
 unDataD :: Dec -> Maybe (Cxt, Name, [TyVarBndr], Maybe Kind, [Con], [Type])
-unDataD (DataD cxt n bs mk cs ds) = Just (cxt, n, bs, mk, cs, ds)
+unDataD (DataD cxt n bs mk cs ds) = Just (cxt, n, bs, mk, cs, ds >>= 
unDerivClause)
 unDataD  _                        = Nothing
 
 -- | Definition against 'newtypeD',
 --   compatible with before temaplate-haskell-2.11
 newtypeD' :: CxtQ -> Name -> [TyVarBndr] -> ConQ -> [Name]
           -> DecQ
-newtypeD' cxt n bs c ds = newtypeD cxt n bs Nothing c $ mapM conT ds
+newtypeD' cxt n bs c ds = newtypeD cxt n bs Nothing c $ derivesFromNames ds
 
 -- | Compatible interface to destruct 'NewtypeD'
 unNewtypeD :: Dec -> Maybe (Cxt, Name, [TyVarBndr], Maybe Kind, Con, [Type])
-unNewtypeD (NewtypeD cxt n bs mk c ds) = Just (cxt, n, bs, mk, c, ds)
+unNewtypeD (NewtypeD cxt n bs mk c ds) = Just (cxt, n, bs, mk, c, ds >>= 
unDerivClause)
 unNewtypeD  _                          = Nothing
 
 -- | Definition against 'dataInstD',
 --   compatible with before temaplate-haskell-2.11
 dataInstD' :: CxtQ -> Name -> [TypeQ] -> [ConQ] -> [Name]
            -> DecQ
-dataInstD' cxt n as cs ds = dataInstD cxt n as Nothing cs $ mapM conT ds
+dataInstD' cxt n as cs ds = dataInstD cxt n as Nothing cs $ derivesFromNames ds
 
 -- | Compatible interface to destruct 'DataInstD'
 unDataInstD :: Dec -> Maybe (Cxt, Name, [Type], Maybe Kind, [Con], [Type])
-unDataInstD (DataInstD cxt n as mk cs ds) = Just (cxt, n, as, mk, cs, ds)
+unDataInstD (DataInstD cxt n as mk cs ds) = Just (cxt, n, as, mk, cs, ds >>= 
unDerivClause)
 unDataInstD  _                            = Nothing
 
 -- | Definition against 'newtypeInstD',
 --   compatible with before temaplate-haskell-2.11
 newtypeInstD' :: CxtQ -> Name -> [TypeQ] -> ConQ -> [Name]
               -> DecQ
-newtypeInstD' cxt n as c ds = newtypeInstD cxt n as Nothing c $ mapM conT ds
+newtypeInstD' cxt n as c ds = newtypeInstD cxt n as Nothing c $ 
derivesFromNames ds
 
 -- | Compatible interface to destruct 'NewtypeInstD'
 unNewtypeInstD :: Dec -> Maybe (Cxt, Name, [Type], Maybe Kind, Con, [Type])
-unNewtypeInstD (NewtypeInstD cxt n as mk c ds) = Just (cxt, n, as, mk, c, ds)
+unNewtypeInstD (NewtypeInstD cxt n as mk c ds) = Just (cxt, n, as, mk, c, ds 
>>= unDerivClause)
 unNewtypeInstD  _                              = Nothing
 
 -- | Compatible interface to destruct 'InstanceD'
 --   No Overlap type is defined before template-haskell-2.11.
+unInstanceD :: Dec -> Maybe (Cxt, Type, [Dec])
 unInstanceD (InstanceD _ cxt ty decs) = Just (cxt, ty, decs)
 unInstanceD  _                        = Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/th-data-compat-0.0.2.2/src/Language/Haskell/TH/Compat/Data/V211.hs 
new/th-data-compat-0.0.2.4/src/Language/Haskell/TH/Compat/Data/V211.hs
--- old/th-data-compat-0.0.2.2/src/Language/Haskell/TH/Compat/Data/V211.hs      
1970-01-01 01:00:00.000000000 +0100
+++ new/th-data-compat-0.0.2.4/src/Language/Haskell/TH/Compat/Data/V211.hs      
2017-07-15 03:51:20.000000000 +0200
@@ -0,0 +1,64 @@
+module Language.Haskell.TH.Compat.Data.V211 (
+  dataD', unDataD,
+  newtypeD', unNewtypeD,
+  dataInstD', unDataInstD,
+  newtypeInstD', unNewtypeInstD,
+  unInstanceD,
+  ) where
+
+import Language.Haskell.TH
+  (CxtQ, ConQ, TypeQ, DecQ,
+   Cxt, Con, Type, Name, TyVarBndr, Kind,
+   Dec (DataD, NewtypeD, DataInstD, NewtypeInstD, InstanceD),
+   dataD, newtypeD, dataInstD, newtypeInstD, conT)
+
+
+-- | Definition against 'dataD',
+--   compatible with before temaplate-haskell-2.11
+dataD' :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name]
+       -> DecQ
+dataD' cxt n bs cs ds = dataD cxt n bs Nothing cs $ mapM conT ds
+
+-- | Compatible interface to destruct 'DataD'
+unDataD :: Dec -> Maybe (Cxt, Name, [TyVarBndr], Maybe Kind, [Con], [Type])
+unDataD (DataD cxt n bs mk cs ds) = Just (cxt, n, bs, mk, cs, ds)
+unDataD  _                        = Nothing
+
+-- | Definition against 'newtypeD',
+--   compatible with before temaplate-haskell-2.11
+newtypeD' :: CxtQ -> Name -> [TyVarBndr] -> ConQ -> [Name]
+          -> DecQ
+newtypeD' cxt n bs c ds = newtypeD cxt n bs Nothing c $ mapM conT ds
+
+-- | Compatible interface to destruct 'NewtypeD'
+unNewtypeD :: Dec -> Maybe (Cxt, Name, [TyVarBndr], Maybe Kind, Con, [Type])
+unNewtypeD (NewtypeD cxt n bs mk c ds) = Just (cxt, n, bs, mk, c, ds)
+unNewtypeD  _                          = Nothing
+
+-- | Definition against 'dataInstD',
+--   compatible with before temaplate-haskell-2.11
+dataInstD' :: CxtQ -> Name -> [TypeQ] -> [ConQ] -> [Name]
+           -> DecQ
+dataInstD' cxt n as cs ds = dataInstD cxt n as Nothing cs $ mapM conT ds
+
+-- | Compatible interface to destruct 'DataInstD'
+unDataInstD :: Dec -> Maybe (Cxt, Name, [Type], Maybe Kind, [Con], [Type])
+unDataInstD (DataInstD cxt n as mk cs ds) = Just (cxt, n, as, mk, cs, ds)
+unDataInstD  _                            = Nothing
+
+-- | Definition against 'newtypeInstD',
+--   compatible with before temaplate-haskell-2.11
+newtypeInstD' :: CxtQ -> Name -> [TypeQ] -> ConQ -> [Name]
+              -> DecQ
+newtypeInstD' cxt n as c ds = newtypeInstD cxt n as Nothing c $ mapM conT ds
+
+-- | Compatible interface to destruct 'NewtypeInstD'
+unNewtypeInstD :: Dec -> Maybe (Cxt, Name, [Type], Maybe Kind, Con, [Type])
+unNewtypeInstD (NewtypeInstD cxt n as mk c ds) = Just (cxt, n, as, mk, c, ds)
+unNewtypeInstD  _                              = Nothing
+
+-- | Compatible interface to destruct 'InstanceD'
+--   No Overlap type is defined before template-haskell-2.11.
+unInstanceD :: Dec -> Maybe (Cxt, Type, [Dec])
+unInstanceD (InstanceD _ cxt ty decs) = Just (cxt, ty, decs)
+unInstanceD  _                        = Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/th-data-compat-0.0.2.2/src/Language/Haskell/TH/Compat/Data.hs 
new/th-data-compat-0.0.2.4/src/Language/Haskell/TH/Compat/Data.hs
--- old/th-data-compat-0.0.2.2/src/Language/Haskell/TH/Compat/Data.hs   
2016-06-19 14:37:50.000000000 +0200
+++ new/th-data-compat-0.0.2.4/src/Language/Haskell/TH/Compat/Data.hs   
2017-07-15 03:51:20.000000000 +0200
@@ -2,7 +2,7 @@
 
 -- |
 -- Module      : Language.Haskell.TH.Compat.Data
--- Copyright   : 2016 Kei Hibino
+-- Copyright   : 2016-2017 Kei Hibino
 -- License     : BSD3
 --
 -- Maintainer  : [email protected]
@@ -19,8 +19,10 @@
   unDataD, unNewtypeD, unDataInstD, unNewtypeInstD, unInstanceD,
   ) where
 
-#if MIN_VERSION_template_haskell(2,11,0)
+#if MIN_VERSION_template_haskell(2,12,0)
 import Language.Haskell.TH.Compat.Data.Current
+#elif MIN_VERSION_template_haskell(2,11,0)
+import Language.Haskell.TH.Compat.Data.V211
 #else
 import Language.Haskell.TH.Compat.Data.V210
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/th-data-compat-0.0.2.2/th-data-compat.cabal 
new/th-data-compat-0.0.2.4/th-data-compat.cabal
--- old/th-data-compat-0.0.2.2/th-data-compat.cabal     2016-06-19 
14:37:50.000000000 +0200
+++ new/th-data-compat-0.0.2.4/th-data-compat.cabal     2017-07-15 
03:51:20.000000000 +0200
@@ -1,6 +1,6 @@
 
 name:                th-data-compat
-version:             0.0.2.2
+version:             0.0.2.4
 synopsis:            Compatibility for data definition template of TH
 description:         This package contains wrapped name definitions of
                      data definition template
@@ -8,11 +8,12 @@
 license-file:        LICENSE
 author:              Kei Hibino
 maintainer:          [email protected]
-copyright:           Copyright (c) 2016 Kei Hibino
+copyright:           Copyright (c) 2016-2017 Kei Hibino
 category:            Language
 build-type:          Simple
 cabal-version:       >=1.10
-tested-with:           GHC == 8.0.1
+tested-with:           GHC == 8.2.1
+                     , GHC == 8.0.1, GHC == 8.0.2
                      , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
                      , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
                      , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
@@ -22,6 +23,10 @@
   description: If true, use template-haskell 2.10 or older, otherwise use 
template-haskell 2.11 or newer.
   default:     True
 
+flag template-haskell-212
+  description: If true, use template-haskell 2.12 or newer, otherwise use 
template-haskell 2.11 or older.
+  default:     False
+
 library
   exposed-modules:      Language.Haskell.TH.Compat.Data
 
@@ -30,9 +35,14 @@
                           Language.Haskell.TH.Compat.Data.V210
     build-depends:        template-haskell >=2.4 && <2.11
   else
-    other-modules:
+    if flag(template-haskell-212)
+      other-modules:
                           Language.Haskell.TH.Compat.Data.Current
-    build-depends:        template-haskell >=2.11
+      build-depends:      template-haskell >=2.12
+    else
+      other-modules:
+                          Language.Haskell.TH.Compat.Data.V211
+      build-depends:      template-haskell ==2.11.*
 
   build-depends:         base <5
 


Reply via email to