Hello community, here is the log from the commit of package ghc-th-lift for openSUSE:Factory checked in at 2019-05-09 10:10:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-th-lift (Old) and /work/SRC/openSUSE:Factory/.ghc-th-lift.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-th-lift" Thu May 9 10:10:29 2019 rev:8 rq:700205 version:0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-th-lift/ghc-th-lift.changes 2018-10-25 09:06:06.506513292 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-th-lift.new.5148/ghc-th-lift.changes 2019-05-09 10:10:34.213227350 +0200 @@ -1,0 +2,8 @@ +Tue Apr 30 09:23:03 UTC 2019 - psim...@suse.com + +- Update th-lift to version 0.8. + Upstream has renamed and modified the change log file(s) in this + release. Unfortunately, the automatic updater cannot reliable + determine relevant entries for this release. + +------------------------------------------------------------------- Old: ---- th-lift-0.7.11.tar.gz New: ---- th-lift-0.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-th-lift.spec ++++++ --- /var/tmp/diff_new_pack.R7udrA/_old 2019-05-09 10:10:35.853232046 +0200 +++ /var/tmp/diff_new_pack.R7udrA/_new 2019-05-09 10:10:35.853232046 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-th-lift # -# 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,7 +19,7 @@ %global pkg_name th-lift %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.7.11 +Version: 0.8 Release: 0 Summary: Derive Template Haskell's Lift class for datatypes License: (BSD-3-Clause OR GPL-2.0-only) @@ -32,7 +32,14 @@ BuildRequires: ghc-th-abstraction-devel %description -Derive Template Haskell's Lift class for datatypes. +Derive Template Haskell's Lift class for datatypes using 'TemplateHaskell' + +* <https://hackage.haskell.org/package/th-orphans th-orphans> package provides +instances for 'template-haskell' syntax types + +* <http://hackage.haskell.org/package/th-lift-instances th-lift-instances> +package provides 'Lift' (compat) instances for types in 'base', 'text', +'bytestring', 'vector' etc. %package devel Summary: Haskell %{pkg_name} library development files @@ -69,6 +76,6 @@ %license GPL-2 %files devel -f %{name}-devel.files -%doc Changelog +%doc CHANGELOG.md %changelog ++++++ th-lift-0.7.11.tar.gz -> th-lift-0.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-lift-0.7.11/CHANGELOG.md new/th-lift-0.8/CHANGELOG.md --- old/th-lift-0.7.11/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 +++ new/th-lift-0.8/CHANGELOG.md 2019-04-26 22:23:51.000000000 +0200 @@ -0,0 +1,82 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +## [0.8] + +* Remove `Lift ()`, `Ratio`, `Identity` and `Const ()` instances. + These are now provided in [`th-lift-instances` package](http://hackage.haskell.org/package/th-lift-instances) +- Use `TemplateHaskellQuotes` where available + +## [0.7.11] - 2018-08-27 + +* Support for GHC 8.6. + +## [0.7.10] - 2018-02-01 + +* Add support for data families + +## [0.7.9] - 2018-02-01 + +* `Lift` instances for `Identity` and `Const`. + +## [0.7.8] - 2018-02-01 + +* GHC 8.4 compatibility. + +## [0.7.7] - 2015-04-19 + +* GHC 8.2 compatibility. + +## [0.7.6] - 2015-01-18 + +* GHC 8.1 compatibility. + +## [0.7.5] - 2015-11-19 + +* Added `makeLift`, for cases when it's necessary to write the + instance manually. (Thanks to Ryan Scott). +* Support empty datatypes and unboxed types. + +## [0.7] - 2014-12-07 + +* Support GHC 7.9 and hopefully 7.10, thanks to Richard Eisenberg. +* On versions of GHC that support role inference, don't constrain + phantom type variables. +* Get rid of some orphan instances when using GHC >= 7.9. + +## [0.6] - 2013-12-09 + +* Support GHC 7.8, thanks to Michael Snoyberg. +* Support existentially quantified type variables in datatype + declarations. +* Handle exotic kinds properly. + +## [0.5.2] - 2010-09-19 + +* Support older GHCs and Cabal, thanks to Ben Millwood. + +## [0.5] - 2010-08-05 + +* Support for contexts in datatypes, thanks to Ben Millwood. +* `deriveLiftWith` becomes `deriveLift'` and takes an `Info` + structure rather than a custom reification function. +* Add `deriveLiftMany` to derive many `Lift` instances in one go. + +## [0.4] - 2010-08-02 + +* Add support for newtypes and records syntax, thanks to a patch by + Ben Millwood. +* Add support for infix constructors. +* `deriveLift` returns a list of declarations. +* New `deriveLiftWith` function with custom reification, following + a feature request by Jonas Duregård. + +## [0.3] - 2010-03-24 + +* Port to Template Haskell 2.4. +* Maintainer is now Mathieu Boespflug. + +## [0.2] - 2006-09-06 + +Initial release by Ian Lynagh. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-lift-0.7.11/Changelog new/th-lift-0.8/Changelog --- old/th-lift-0.7.11/Changelog 2016-01-18 18:29:59.000000000 +0100 +++ new/th-lift-0.8/Changelog 1970-01-01 01:00:00.000000000 +0100 @@ -1,52 +0,0 @@ -2015-01-18 Mathieu Boespflug <mb...@tweag.net> - - * GHC 8.1 compatibility. - -2015-11-19 Mathieu Boespflug <mb...@tweag.net> - - * Added makeLift, for cases when it's necessary to write the - instance manually. (Thanks to Ryan Scott). - * Support empty datatypes and unboxed types. - -2014-12-07 Mathieu Boespflug <mb...@tweag.net> - - * Support GHC 7.9 and hopefully 7.10, thanks to Richard Eisenberg. - * On versions of GHC that support role inference, don't constrain - phantom type variables. - * Get rid of some orphan instances when using GHC >= 7.9. - -2013-12-09 Mathieu Boespflug <mb...@tweag.net> - - * Support GHC 7.8, thanks to Michael Snoyberg. - * Support existentially quantified type variables in datatype - declarations. - * Handle exotic kinds properly. - -2010-09-19 Mathieu Boespflug <mb...@tweag.net> - - * Support older GHCs and Cabal, thanks to Ben Millwood. - -2010-08-05 Mathieu Boespflug <mb...@tweag.net> - - * Support for contexts in datatypes, thanks to Ben Millwood. - * deriveLiftWith becomes deriveLift' and takes an Info structure - rather than a custom reification function. - * Add deriveLiftMany to derive many Lift instances in one go. - -2010-08-02 Mathieu Boespflug <mb...@tweag.net> - - * Add support for newtypes and records syntax, thanks to a patch - by Ben Millwood. - * Add support for infix constructors. - * deriveLift returns a list of declarations. - * New deriveLiftWith function with custom reification, following a - feature request by Jonas Duregård. - -2010-03-24 Mathieu Boespflug <mb...@tweag.net> - - * Port to Template Haskell 2.4. - * Maintainer is now Mathieu Boespflug. - -2006-09-06 Ian Lynagh <ig...@earth.li> - - * Initial release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-lift-0.7.11/src/Language/Haskell/TH/Lift.hs new/th-lift-0.8/src/Language/Haskell/TH/Lift.hs --- old/th-lift-0.7.11/src/Language/Haskell/TH/Lift.hs 2018-05-14 22:12:56.000000000 +0200 +++ new/th-lift-0.8/src/Language/Haskell/TH/Lift.hs 2019-04-26 22:23:51.000000000 +0200 @@ -1,8 +1,12 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MagicHash #-} -{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} +#if __GLASGOW_HASKELL__ >= 800 +{-# LANGUAGE TemplateHaskellQuotes #-} +#else +{-# LANGUAGE TemplateHaskell #-} +#endif {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -16,10 +20,6 @@ , Lift(..) ) where -#if !(MIN_VERSION_template_haskell(2,4,0)) -import Data.PackedString (PackedString, packString, unpackPS) -#endif /* MIN_VERSION_template_haskell(2,4,0) */ - import GHC.Base (unpackCString#) import GHC.Exts (Double(..), Float(..), Int(..), Word(..)) import GHC.Prim (Addr#, Double#, Float#, Int#, Word#) @@ -155,7 +155,7 @@ consMatches :: Name -> [ConstructorInfo] -> [Q Match] consMatches n [] = [match wildP (normalB e) []] where - e = [| errorQExp $(stringE ("Can't lift value of empty datatype " ++ nameBase n)) |] + e = varE 'errorQExp `appE` (stringE $ "Can't lift value of empty datatype " ++ nameBase n) consMatches _ cons = concatMap doCons cons doCons :: ConstructorInfo -> [Q Match] @@ -167,10 +167,10 @@ let con = [| conE c |] case (variant, ns, ts) of (InfixConstructor, [x0, x1], [t0, t1]) -> - let e = [| infixApp $(liftVar x0 t0) $con $(liftVar x1 t1) |] + let e = varE 'infixApp `appE` liftVar x0 t0 `appE` con `appE` liftVar x1 t1 in match (infixP (varP x0) c (varP x1)) (normalB e) [] (_, _, _) -> - let e = foldl (\e1 e2 -> [| appE $e1 $e2 |]) con $ zipWith liftVar ns ts + let e = foldl (\e1 e2 -> varE 'appE `appE` e1 `appE` e2) con $ zipWith liftVar ns ts in match (conP c (map varP ns)) (normalB e) [] #if MIN_VERSION_template_haskell(2,9,0) @@ -186,31 +186,41 @@ liftVar :: Name -> Type -> Q Exp liftVar varName (ConT tyName) #if MIN_VERSION_template_haskell(2,8,0) - | tyName == ''Addr# = [| litE (stringPrimL (map (fromIntegral . ord) - (unpackCString# $var))) |] + | tyName == ''Addr# = apps + [ varE 'litE, varE 'stringPrimL, varE 'map, [| fromIntegral . ord |] + , varE 'unpackCString# ] #else /* !(MIN_VERSION_template_haskell(2,8,0)) */ - | tyName == ''Addr# = [| litE (stringPrimL (unpackCString# $var)) |] + | tyName == ''Addr# = apps + [ varE 'litE, varE 'stringPrimL, varE 'unpackCString# ] #endif #if MIN_VERSION_template_haskell(2,11,0) - | tyName == ''Char# = [| litE (charPrimL (C# $var)) |] + | tyName == ''Char# = apps [ varE 'litE, varE 'charPrimL, conE 'C# ] #endif /* !(MIN_VERSION_template_haskell(2,11,0)) */ - | tyName == ''Double# = [| litE (doublePrimL (toRational (D# $var))) |] - | tyName == ''Float# = [| litE (floatPrimL (toRational (F# $var))) |] - | tyName == ''Int# = [| litE (intPrimL (toInteger (I# $var))) |] - | tyName == ''Word# = [| litE (wordPrimL (toInteger (W# $var))) |] + | tyName == ''Double# = apps [ varE 'litE, varE 'doublePrimL, varE 'toRational, conE 'D# ] + | tyName == ''Float# = apps [ varE 'litE, varE 'floatPrimL, varE 'toRational, conE 'F# ] + | tyName == ''Int# = apps [ varE 'litE, varE 'intPrimL, varE 'toInteger, conE 'I# ] + | tyName == ''Word# = apps [ varE 'litE, varE 'wordPrimL, varE 'toInteger, conE 'W# ] + where + apps = foldr appE var + var :: Q Exp var = varE varName -liftVar varName _ = [| lift $(varE varName) |] + +liftVar varName _ = varE 'lift `appE` varE varName withInfo :: DatatypeInfo -> (Cxt -> Name -> [Type] -> [ConstructorInfo] -> Q a) -> Q a withInfo i f = case i of - DatatypeInfo { datatypeContext = dcx - , datatypeName = n - , datatypeVars = vs - , datatypeCons = cons + DatatypeInfo { datatypeContext = dcx + , datatypeName = n +#if MIN_VERSION_th_abstraction(0,3,0) + , datatypeInstTypes = vs +#else + , datatypeVars = vs +#endif + , datatypeCons = cons } -> f dcx n vs cons @@ -225,19 +235,15 @@ #if MIN_VERSION_template_haskell(2,4,0) instance Lift OccName where - lift n = [| mkOccName $(lift $ occString n) |] + lift n = [| mkOccName |] `appE` lift (occString n) instance Lift PkgName where - lift n = [| mkPkgName $(lift $ pkgString n) |] + lift n = [| mkPkgName |] `appE` lift (pkgString n) instance Lift ModName where - lift n = [| mkModName $(lift $ modString n) |] - -#else /* MIN_VERSION_template_haskell(2,4,0) */ -instance Lift PackedString where - lift ps = [| packString $(lift $ unpackPS ps) |] - + lift n = [| mkModName |] `appE` lift (modString n) #endif /* MIN_VERSION_template_haskell(2,4,0) */ + instance Lift NameFlavour where lift NameS = [| NameS |] lift (NameQ modnam) = [| NameQ modnam |] @@ -257,21 +263,3 @@ lift VarName = [| VarName |] lift DataName = [| DataName |] lift TcClsName = [| TcClsName |] - -#if !(MIN_VERSION_template_haskell(2,10,0)) --- These instances should really go in the template-haskell package. - -instance Lift () where - lift _ = [| () |] - -instance Integral a => Lift (Ratio a) where - lift x = return (LitE (RationalL (toRational x))) -#endif - -#if MIN_VERSION_base(4,8,0) -instance Lift a => Lift (Identity a) where - lift = appE (conE 'Identity) . lift . runIdentity -#endif - -instance Lift a => Lift (Const a b) where - lift = appE (conE 'Const) . lift . getConst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-lift-0.7.11/th-lift.cabal new/th-lift-0.8/th-lift.cabal --- old/th-lift-0.7.11/th-lift.cabal 2018-08-27 09:06:08.000000000 +0200 +++ new/th-lift-0.8/th-lift.cabal 2019-04-26 22:23:51.000000000 +0200 @@ -1,6 +1,6 @@ Name: th-lift -Version: 0.7.11 -Cabal-Version: >= 1.8 +Version: 0.8 +Cabal-Version: 1.12 License: BSD3 License-Files: COPYING, BSD3, GPL-2 Copyright: © 2006 Ian Lynagh, © 2010-2018 Mathieu Boespflug @@ -9,42 +9,42 @@ Homepage: http://github.com/mboes/th-lift Synopsis: Derive Template Haskell's Lift class for datatypes. Description: - Derive Template Haskell's Lift class for datatypes. + Derive Template Haskell's Lift class for datatypes using @TemplateHaskell@ + . + * <https://hackage.haskell.org/package/th-orphans th-orphans> package provides instances for @template-haskell@ syntax types + . + * <http://hackage.haskell.org/package/th-lift-instances th-lift-instances> package provides @Lift@ (compat) instances for types in @base@, @text@, @bytestring@, @vector@ etc. Category: Language -Tested-With: GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.2 +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 build-type: Simple -Extra-source-files: Changelog +Extra-source-files: CHANGELOG.md source-repository head type: git location: git://github.com/mboes/th-lift Library - Exposed-modules: Language.Haskell.TH.Lift - Extensions: CPP, TemplateHaskell, MagicHash, TypeSynonymInstances, FlexibleInstances - Hs-Source-Dirs: src - Build-Depends: base >= 3 && < 5, - ghc-prim, - th-abstraction >= 0.2.3 - - ghc-options: -Wall - if impl(ghc < 6.12) - Build-Depends: packedstring == 0.1.*, - template-haskell >= 2.2 && < 2.4 + Default-Language: Haskell2010 + Exposed-modules: Language.Haskell.TH.Lift + Other-Extensions: CPP, MagicHash, TypeSynonymInstances, FlexibleInstances + if impl(ghc >= 8.0) + Other-Extensions: TemplateHaskellQuotes else - Build-Depends: template-haskell >= 2.4 && < 2.15 + Other-Extensions: TemplateHaskell + Hs-Source-Dirs: src + Build-Depends: base >= 4.3 && < 5, + ghc-prim, + th-abstraction >= 0.2.3 && < 0.4, + template-haskell >= 2.4 && < 2.15 Test-Suite test + Default-Language: Haskell2010 Type: exitcode-stdio-1.0 Main-Is: Test.hs Hs-Source-Dirs: t other-modules: Foo ghc-options: -Wall - Build-Depends: base >= 3 && < 5, + Build-Depends: base, ghc-prim, - th-lift - if impl(ghc < 6.12) - Build-Depends: packedstring == 0.1.*, - template-haskell >= 2.2 && < 2.4 - else - Build-Depends: template-haskell >= 2.4 && < 2.15 + th-lift, + template-haskell