Hello community, here is the log from the commit of package ghc-th-utilities for openSUSE:Factory checked in at 2020-05-11 13:36:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-th-utilities (Old) and /work/SRC/openSUSE:Factory/.ghc-th-utilities.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-th-utilities" Mon May 11 13:36:28 2020 rev:9 rq:801057 version:0.2.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-th-utilities/ghc-th-utilities.changes 2019-12-27 13:58:25.940805114 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-th-utilities.new.2738/ghc-th-utilities.changes 2020-05-11 13:36:37.040521852 +0200 @@ -1,0 +2,12 @@ +Wed Apr 1 12:37:24 UTC 2020 - psim...@suse.com + +- Update th-utilities to version 0.2.4.0. + ## 0.2.4.0 + + * Compatibility with GHC-8.10 + + * Behavior change in reification of type family instances. Instead of + erroring if the instance mentions a kind variable, now just ignores + it. + +------------------------------------------------------------------- Old: ---- th-utilities-0.2.3.1.tar.gz New: ---- th-utilities-0.2.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-th-utilities.spec ++++++ --- /var/tmp/diff_new_pack.VfX3iK/_old 2020-05-11 13:36:37.844523538 +0200 +++ /var/tmp/diff_new_pack.VfX3iK/_new 2020-05-11 13:36:37.848523546 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-th-utilities # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 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,7 +19,7 @@ %global pkg_name th-utilities %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.2.3.1 +Version: 0.2.4.0 Release: 0 Summary: Collection of useful functions for use with Template Haskell License: MIT ++++++ th-utilities-0.2.3.1.tar.gz -> th-utilities-0.2.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-utilities-0.2.3.1/ChangeLog.md new/th-utilities-0.2.4.0/ChangeLog.md --- old/th-utilities-0.2.3.1/ChangeLog.md 2019-10-17 05:23:43.000000000 +0200 +++ new/th-utilities-0.2.4.0/ChangeLog.md 2020-04-01 07:18:00.000000000 +0200 @@ -1,5 +1,13 @@ # ChangeLog +## 0.2.4.0 + +* Compatibility with GHC-8.10 + +* Behavior change in reification of type family instances. Instead of + erroring if the instance mentions a kind variable, now just ignores + it. + ## 0.2.3.1 * Compatibility with GHC-8.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-utilities-0.2.3.1/src/TH/ReifySimple.hs new/th-utilities-0.2.4.0/src/TH/ReifySimple.hs --- old/th-utilities-0.2.3.1/src/TH/ReifySimple.hs 2019-10-17 05:21:51.000000000 +0200 +++ new/th-utilities-0.2.4.0/src/TH/ReifySimple.hs 2020-04-01 07:00:25.000000000 +0200 @@ -61,6 +61,9 @@ import Data.Typeable (Typeable) import GHC.Generics (Generic) import Language.Haskell.TH +#if MIN_VERSION_template_haskell(2,16,0) + hiding (reifyType) +#endif import Language.Haskell.TH.Instances () import TH.Utilities @@ -260,34 +263,29 @@ FamilyI (ClosedTypeFamilyD (TypeFamilyHead name tvs _result _injectivity) eqns) _ -> Just $ TypeFamily name (map tyVarBndrName tvs) $ map (goEqn name) eqns FamilyI (OpenTypeFamilyD (TypeFamilyHead name tvs _result _injectivity)) insts -> - Just $ TypeFamily name (map tyVarBndrName tvs) $ map go insts + Just $ TypeFamily name (map tyVarBndrName tvs) $ map (goInst name) insts #else FamilyI (ClosedTypeFamilyD name tvs _kind eqns) [] -> Just $ TypeFamily name (map tyVarBndrName tvs) $ map (goEqn name) eqns FamilyI (FamilyD TypeFam name tvs _kind) insts -> - Just $ TypeFamily name (map tyVarBndrName tvs) $ map go insts + Just $ TypeFamily name (map tyVarBndrName tvs) $ map (goInst name) insts #endif _ -> Nothing where #if MIN_VERSION_template_haskell(2,15,0) - goEqn _ (TySynEqn _ lhs ty) - | ConT name:params <- unAppsT lhs - = TypeInst name params ty - | otherwise - = error $ "Unexpected type family instance head: " ++ pprint lhs + toParams ps (AppT ty p) = toParams (p : ps) ty + toParams ps (AppKindT ty _) = toParams ps ty + toParams ps _ = ps + goEqn name (TySynEqn _ lty rty) = TypeInst name (toParams [] lty) rty + goInst name (TySynInstD eqn) = goEqn name eqn + goInst _ info' = error $ + "Unexpected instance in FamilyI in infoToTypeInsts:\n" ++ pprint info' #else goEqn name (TySynEqn params ty) = TypeInst name params ty -#endif - -#if MIN_VERSION_template_haskell(2,15,0) - go (TySynInstD (TySynEqn _ lhs ty)) - | ConT name:params <- unAppsT lhs - = TypeInst name params ty -#else - go (TySynInstD name (TySynEqn params ty)) = TypeInst name params ty -#endif - go info' = error $ + goInst name (TySynInstD _ eqn) = goEqn name eqn + goInst _ info' = error $ "Unexpected instance in FamilyI in infoToTypeInsts:\n" ++ pprint info' +#endif infoToDataCon :: Info -> Maybe DataCon infoToDataCon info = case info of @@ -325,9 +323,9 @@ DataCon name (tvs0 ++ map tyVarBndrName tvs) (preds0 ++ preds) fields) (conToDataCons con) #if MIN_VERSION_template_haskell(2,11,0) GadtC ns slots _ -> - map (\n -> DataCon n [] [] (map (\(_, ty) -> (Nothing, ty)) slots)) ns + map (\dn -> DataCon dn [] [] (map (\(_, ty) -> (Nothing, ty)) slots)) ns RecGadtC ns fields _ -> - map (\n -> DataCon n [] [] (map (\(n, _, ty) -> (Just n, ty)) fields)) ns + map (\dn -> DataCon dn [] [] (map (\(fn, _, ty) -> (Just fn, ty)) fields)) ns #endif -- | Like 'reifyDataType', but takes a 'Type' instead of just the 'Name' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-utilities-0.2.3.1/src/TH/Utilities.hs new/th-utilities-0.2.4.0/src/TH/Utilities.hs --- old/th-utilities-0.2.3.1/src/TH/Utilities.hs 2019-10-17 05:21:51.000000000 +0200 +++ new/th-utilities-0.2.4.0/src/TH/Utilities.hs 2020-04-01 07:14:37.000000000 +0200 @@ -152,10 +152,27 @@ -- Without 'ExpLifter', 'lift' tends to just generate code involving -- data construction. With 'ExpLifter', you can put more complicated -- expression into this construction. -data ExpLifter = ExpLifter ExpQ deriving (Typeable) +-- +-- Note that this cannot be used in typed quotes, because 'liftTyped' +-- will throw an exception. This is because this hack is incompatible +-- with the type of 'liftTyped', as it would require the generated +-- code to have type 'ExpLifter'. +data ExpLifter = ExpLifter +#if __GLASGOW_HASKELL__ >= 811 + (forall m. Quote m => m Exp) +#else + ExpQ +#endif + deriving (Typeable) instance Lift ExpLifter where lift (ExpLifter e) = e +#if MIN_VERSION_template_haskell(2,16,0) + liftTyped = error $ concat + [ "'liftTyped' is not implemented for 'ExpLifter', " + , "because it would require the generated code to have type 'ExpLifter'" + ] +#endif -- | Print splices generated by a TH splice (the printing will happen -- during compilation, as a GHC warning). Useful for debugging. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-utilities-0.2.3.1/th-utilities.cabal new/th-utilities-0.2.4.0/th-utilities.cabal --- old/th-utilities-0.2.3.1/th-utilities.cabal 2019-10-17 05:24:31.000000000 +0200 +++ new/th-utilities-0.2.4.0/th-utilities.cabal 2020-04-01 07:18:52.000000000 +0200 @@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack -- --- hash: bda1ef012fe2084207b76af87373ec5568167d027ce8878be222946dc4a82d5b +-- hash: 50c08bc61c9ae9c17ffbb564778e8b933569d268767798c7a9c1a14ee7bed17d name: th-utilities -version: 0.2.3.1 +version: 0.2.4.0 synopsis: Collection of useful functions for use with Template Haskell category: Template Haskell homepage: https://github.com/fpco/th-utilities#readme