Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-th-expand-syns for openSUSE:Factory checked in at 2021-03-17 20:15:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-th-expand-syns (Old) and /work/SRC/openSUSE:Factory/.ghc-th-expand-syns.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-th-expand-syns" Wed Mar 17 20:15:47 2021 rev:13 rq:879166 version:0.4.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-th-expand-syns/ghc-th-expand-syns.changes 2020-12-22 11:47:30.465913304 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-th-expand-syns.new.2401/ghc-th-expand-syns.changes 2021-03-17 20:19:39.379293031 +0100 @@ -1,0 +2,13 @@ +Fri Mar 12 20:54:41 UTC 2021 - psim...@suse.com + +- Update th-expand-syns to version 0.4.8.0. + ## 0.4.8.0 [2021.03.12] + + * Make the test suite compile with GHC 9.0 or later. + * Drop support for pre-7.0 versions of GHC. + + ## 0.4.7.0 + + * Support GHC 9.0 / template-haskell-2.17 (Thanks to @mgsloan) + +------------------------------------------------------------------- Old: ---- th-expand-syns-0.4.6.0.tar.gz New: ---- th-expand-syns-0.4.8.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-th-expand-syns.spec ++++++ --- /var/tmp/diff_new_pack.2OT5j4/_old 2021-03-17 20:19:39.911293758 +0100 +++ /var/tmp/diff_new_pack.2OT5j4/_new 2021-03-17 20:19:39.915293763 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-th-expand-syns # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # 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-expand-syns %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.4.6.0 +Version: 0.4.8.0 Release: 0 Summary: Expands type synonyms in Template Haskell ASTs License: BSD-3-Clause @@ -30,6 +30,7 @@ BuildRequires: ghc-rpm-macros BuildRequires: ghc-syb-devel BuildRequires: ghc-template-haskell-devel +BuildRequires: ghc-th-abstraction-devel ExcludeArch: %{ix86} %description ++++++ th-expand-syns-0.4.6.0.tar.gz -> th-expand-syns-0.4.8.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/LICENSE new/th-expand-syns-0.4.8.0/LICENSE --- old/th-expand-syns-0.4.6.0/LICENSE 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/LICENSE 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2009, Daniel Sch??ssler +Copyright (c) 2009, Daniel Sch??ssler; 2021, Ryan Scott All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/Language/Haskell/TH/ExpandSyns.hs new/th-expand-syns-0.4.8.0/Language/Haskell/TH/ExpandSyns.hs --- old/th-expand-syns-0.4.6.0/Language/Haskell/TH/ExpandSyns.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/Language/Haskell/TH/ExpandSyns.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,3 @@ -{-# OPTIONS -Wall -fno-warn-unused-binds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Language.Haskell.TH.ExpandSyns(-- * Expand synonyms @@ -12,6 +11,7 @@ ,substInCon ,evades,evade) where +import Language.Haskell.TH.Datatype.TyVarBndr import Language.Haskell.TH.ExpandSyns.SemigroupCompat as Sem import Language.Haskell.TH hiding(cxt) import qualified Data.Set as Set @@ -20,6 +20,10 @@ import Control.Monad import Prelude +#if !(MIN_VERSION_base(4,8,0)) +import Control.Applicative +#endif + -- For ghci #ifndef MIN_VERSION_template_haskell #define MIN_VERSION_template_haskell(X,Y,Z) 1 @@ -28,51 +32,25 @@ packagename :: String packagename = "th-expand-syns" - --- Compatibility layer for TH >=2.4 vs. 2.3 -tyVarBndrGetName :: TyVarBndr -> Name -#if !MIN_VERSION_template_haskell(2,10,0) -mapPred :: (Type -> Type) -> Pred -> Pred -#endif -bindPred :: (Type -> Q Type) -> Pred -> Q Pred -tyVarBndrSetName :: Name -> TyVarBndr -> TyVarBndr - -#if MIN_VERSION_template_haskell(2,4,0) -tyVarBndrGetName (PlainTV n) = n -tyVarBndrGetName (KindedTV n _) = n +tyVarBndrSetName :: Name -> TyVarBndr_ flag -> TyVarBndr_ flag +tyVarBndrSetName n = mapTVName (const n) #if MIN_VERSION_template_haskell(2,10,0) -bindPred = id +-- mapPred is not needed for template-haskell >= 2.10 #else +mapPred :: (Type -> Type) -> Pred -> Pred mapPred f (ClassP n ts) = ClassP n (f <$> ts) mapPred f (EqualP t1 t2) = EqualP (f t1) (f t2) - -bindPred f (ClassP n ts) = ClassP n <$> mapM f ts -bindPred f (EqualP t1 t2) = EqualP <$> f t1 <*> f t2 #endif -tyVarBndrSetName n (PlainTV _) = PlainTV n -tyVarBndrSetName n (KindedTV _ k) = KindedTV n k -#else - -type TyVarBndr = Name -type Pred = Type -tyVarBndrGetName = id -mapPred = id +#if MIN_VERSION_template_haskell(2,10,0) +bindPred :: (Type -> Q Type) -> Pred -> Q Pred bindPred = id -tyVarBndrSetName n _ = n - -#endif - - -#if __GLASGOW_HASKELL__ < 709 -(<$>) :: (Functor f) => (a -> b) -> f a -> f b -(<$>) = fmap +#else +bindPred :: (Type -> Q Type) -> Pred -> Q Pred +bindPred f (ClassP n ts) = ClassP n <$> mapM f ts +bindPred f (EqualP t1 t2) = (EqualP <$> f t1) `ap` f t2 #endif -(<*>) :: (Monad m) => m (a -> b) -> m a -> m b -(<*>) = ap - - data SynonymExpansionSettings = SynonymExpansionSettings { @@ -144,7 +122,7 @@ decIsSyn :: SynonymExpansionSettings -> Dec -> Q (Maybe SynInfo) decIsSyn settings = go where - go (TySynD _ vars t) = return (Just (tyVarBndrGetName <$> vars,t)) + go (TySynD _ vars t) = return (Just (tvName <$> vars,t)) #if MIN_VERSION_template_haskell(2,11,0) go (OpenTypeFamilyD (TypeFamilyHead name _ _ _)) = maybeWarnTypeFamily settings name >> no @@ -171,22 +149,18 @@ go (InfixD {}) = no #endif -#if MIN_VERSION_template_haskell(2,4,0) go (PragmaD {}) = no -#endif -- Nothing to expand for data families, so no warning #if MIN_VERSION_template_haskell(2,11,0) go (DataFamilyD {}) = no -#elif MIN_VERSION_template_haskell(2,4,0) +#else go (FamilyD DataFam _ _ _) = no #endif -#if MIN_VERSION_template_haskell(2,4,0) go (DataInstD {}) = no go (NewtypeInstD {}) = no go (TySynInstD {}) = no -#endif #if MIN_VERSION_template_haskell(2,9,0) go (RoleAnnotD {}) = no @@ -212,12 +186,10 @@ no = return Nothing -#if MIN_VERSION_template_haskell(2,4,0) maybeWarnTypeFamily :: SynonymExpansionSettings -> Name -> Q () maybeWarnTypeFamily settings name = when (sesWarnTypeFamilies settings) $ warn ("Type synonym families (and associated type synonyms) are currently not supported (they won't be expanded). Name of unsupported family: "++show name) -#endif @@ -240,15 +212,13 @@ (acc,t') <- go [] t return (foldl applyTypeArg t' acc) -#if MIN_VERSION_template_haskell(2,4,0) expandKindSyns' k = -# if MIN_VERSION_template_haskell(2,8,0) +#if MIN_VERSION_template_haskell(2,8,0) do (acc,k') <- go [] k return (foldl applyTypeArg k' acc) -# else +#else return k -- No kind variables on old versions of GHC -# endif #endif applyTypeArg :: Type -> TypeArg -> Type @@ -323,13 +293,11 @@ go (drop (length vars) acc) expanded -#if MIN_VERSION_template_haskell(2,4,0) go acc (SigT t kind) = do (acc',t') <- go acc t kind' <- expandKindSyns' kind return (acc', SigT t' kind') -#endif #if MIN_VERSION_template_haskell(2,6,0) go acc x@(UnboxedTupleT _) = passThrough acc x @@ -390,6 +358,10 @@ go acc x@ForallVisT{} = forallAppError acc x #endif +#if MIN_VERSION_template_haskell(2,17,0) + go acc x@MulArrowT = passThrough acc x +#endif + -- | An argument to a type, either a normal type ('TANormal') or a visible -- kind application ('TyArg'). data TypeArg @@ -418,9 +390,7 @@ go s@(TupleT _) = s -#if MIN_VERSION_template_haskell(2,4,0) go (SigT t1 kind) = SigT (go t1) (subst vt kind) -#endif #if MIN_VERSION_template_haskell(2,6,0) go s@(UnboxedTupleT _) = s @@ -462,6 +432,10 @@ ForallVisT vars' (doSubsts vts' body) #endif +#if MIN_VERSION_template_haskell(2,17,0) + go MulArrowT = MulArrowT +#endif + -- testCapture :: Type -- testCapture = -- let @@ -475,12 +449,12 @@ -- (v "x" `AppT` v "y")) -#if MIN_VERSION_template_haskell(2,4,0) && !MIN_VERSION_template_haskell(2,10,0) +#if !MIN_VERSION_template_haskell(2,10,0) instance SubstTypeVariable Pred where subst s = mapPred (subst s) #endif -#if MIN_VERSION_template_haskell(2,4,0) && !MIN_VERSION_template_haskell(2,8,0) +#if !MIN_VERSION_template_haskell(2,8,0) instance SubstTypeVariable Kind where subst _ = id -- No kind variables on old versions of GHC #endif @@ -540,33 +514,21 @@ errGadt c = error (packagename++": substInCon currently doesn't support GADT constructors with GHC >= 8 ("++pprint c++")") #endif - -class HasForallConstruct a where - mkForall :: [TyVarBndr] -> Cxt -> a -> a - -instance HasForallConstruct Type where - mkForall = ForallT - -instance HasForallConstruct Con where - mkForall = ForallC - - - -- Apply a substitution to something underneath a @forall@. The continuation -- argument provides new substitutions and fresh type variable binders to avoid -- the outer substitution from capturing the thing underneath the @forall@. -commonForallCase :: (Name, Type) -> [TyVarBndr] - -> ([(Name, Type)] -> [TyVarBndr] -> a) +commonForallCase :: (Name, Type) -> [TyVarBndr_ flag] + -> ([(Name, Type)] -> [TyVarBndr_ flag] -> a) -> a commonForallCase vt@(v,t) bndrs k -- If a variable with the same name as the one to be replaced is bound by the forall, -- the variable to be replaced is shadowed in the body, so we leave the whole thing alone (no recursion) - | v `elem` (tyVarBndrGetName <$> bndrs) = k [vt] bndrs + | v `elem` (tvName <$> bndrs) = k [vt] bndrs | otherwise = let -- prevent capture - vars = tyVarBndrGetName <$> bndrs + vars = tvName <$> bndrs freshes = evades vars t freshTyVarBndrs = zipWith tyVarBndrSetName freshes bndrs substs = zip vars (VarT <$> freshes) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/changelog.markdown new/th-expand-syns-0.4.8.0/changelog.markdown --- old/th-expand-syns-0.4.6.0/changelog.markdown 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/changelog.markdown 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,12 @@ +## 0.4.8.0 [2021.03.12] + +* Make the test suite compile with GHC 9.0 or later. +* Drop support for pre-7.0 versions of GHC. + +## 0.4.7.0 + +* Support GHC 9.0 / template-haskell-2.17 (Thanks to @mgsloan) + ## 0.4.5.0 * Support GHC 8.8 / template-haskell-2.15 (Thanks to Ryan Scott) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/testing/Main.hs new/th-expand-syns-0.4.8.0/testing/Main.hs --- old/th-expand-syns-0.4.6.0/testing/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/testing/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -3,14 +3,14 @@ {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE CPP #-} --- {-# OPTIONS -ddump-splices #-} +import Language.Haskell.TH.Datatype.TyVarBndr import Language.Haskell.TH.ExpandSyns import Language.Haskell.TH -import Language.Haskell.TH.Syntax import Util import Types +main :: IO () main = do putStrLn "Basic test..." $(mkTest [t| forall a. Show a => a -> ForAll [] -> (Int,ApplyToInteger []) |] @@ -31,9 +31,9 @@ -- See comment about 'PlainTV'/'KindedTV' above #if MIN_VERSION_template_haskell(2,10,0) - y_0 = KindedTV (mkName "y_0") StarT + y_0 = kindedTVSpecified (mkName "y_0") StarT #else - y_0 = PlainTV (mkName "y_0") + y_0 = plainTVSpecified (mkName "y_0") #endif expectedExpansion = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/testing/Types.hs new/th-expand-syns-0.4.8.0/testing/Types.hs --- old/th-expand-syns-0.4.6.0/testing/Types.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/testing/Types.hs 2001-09-09 03:46:40.000000000 +0200 @@ -4,7 +4,7 @@ {-# LANGUAGE KindSignatures #-} module Types where -import Language.Haskell.TH +import Language.Haskell.TH.Lib import Language.Haskell.TH.Syntax import Util @@ -19,7 +19,7 @@ type Id a = a -- type E x = forall y. Either x y -> Int -$(sequence [tySynD (mkName "E") [PlainTV (mkName "x")] +$(sequence [tySynD (mkName "E") [plainTV (mkName "x")] (forallT'' ["y"] (conT ''Either `appT` varT' "x" `appT` varT' "y" --> conT ''Int)) ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/testing/Util.hs new/th-expand-syns-0.4.8.0/testing/Util.hs --- old/th-expand-syns-0.4.6.0/testing/Util.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/testing/Util.hs 2001-09-09 03:46:40.000000000 +0200 @@ -2,6 +2,7 @@ {-# LANGUAGE TemplateHaskell #-} module Util where import Language.Haskell.TH +import Language.Haskell.TH.Datatype.TyVarBndr import Language.Haskell.TH.ExpandSyns mkTest :: Q Type -> Q Type -> Q Exp @@ -16,15 +17,24 @@ if (pprint expected'==pprint actual) then [| putStrLn "Ok" |] else [| error "expected /= actual" |] -forallT' xs = forallT ((PlainTV . mkName) `fmap` xs) +forallT' :: [String] -> Q Cxt -> Q Type -> Q Type +forallT' xs = forallT ((plainTVSpecified . mkName) `fmap` xs) + +forallT'' :: [String] -> Q Type -> Q Type forallT'' xs = forallT' xs (cxt []) + +varT' :: String -> Q Type varT' = varT . mkName + +conT' :: String -> Q Type conT' = conT . mkName +(-->) :: Q Type -> Q Type -> Q Type x --> y = (arrowT `appT` x) `appT` y infixr 5 --> #if !MIN_VERSION_template_haskell(2,8,0) +reportWarning :: String -> Q () reportWarning = report False #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/th-expand-syns-0.4.6.0/th-expand-syns.cabal new/th-expand-syns-0.4.8.0/th-expand-syns.cabal --- old/th-expand-syns-0.4.6.0/th-expand-syns.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/th-expand-syns-0.4.8.0/th-expand-syns.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,36 +1,56 @@ name: th-expand-syns -version: 0.4.6.0 +version: 0.4.8.0 synopsis: Expands type synonyms in Template Haskell ASTs description: Expands type synonyms in Template Haskell ASTs. category: Template Haskell license: BSD3 license-file: LICENSE author: Daniel Sch??ssler -maintainer: haskell.5...@gishpuppy.com -cabal-version: >= 1.8 +maintainer: Ryan Scott <ryan.gl.sc...@gmail.com> +cabal-version: >= 1.10 build-type: Simple extra-source-files: changelog.markdown homepage: https://github.com/DanielSchuessler/th-expand-syns 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 + GHC == 8.8.4 + GHC == 8.10.4 + GHC == 9.0.1 source-repository head type: git - location: git://github.com/DanielSchuessler/th-expand-syns.git + location: https://github.com/DanielSchuessler/th-expand-syns.git Library - build-depends: base >= 4 && < 5, template-haskell < 2.17, syb, containers - ghc-options: + build-depends: base >= 4.3 && < 5 + , containers + , syb + , th-abstraction >= 0.4 && < 0.5 + , template-haskell >= 2.5 && < 2.18 + ghc-options: -Wall exposed-modules: Language.Haskell.TH.ExpandSyns other-modules: Language.Haskell.TH.ExpandSyns.SemigroupCompat + default-language: Haskell2010 Test-Suite test-th-expand-syns type: exitcode-stdio-1.0 hs-source-dirs: testing main-is: Main.hs other-modules: Util, Types - build-depends: base, th-expand-syns, template-haskell + build-depends: base + , template-haskell + , th-abstraction + , th-expand-syns + ghc-options: -Wall + if impl(ghc >= 8.6) + ghc-options: -Wno-star-is-type + default-language: Haskell2010