Date: Friday, January 14, 2022 @ 23:00:18 Author: felixonmars Revision: 1103600
archrelease: copy trunk to community-staging-x86_64 Added: haskell-ixset-typed/repos/community-staging-x86_64/ haskell-ixset-typed/repos/community-staging-x86_64/PKGBUILD (from rev 1103599, haskell-ixset-typed/trunk/PKGBUILD) haskell-ixset-typed/repos/community-staging-x86_64/ghc9.patch (from rev 1103599, haskell-ixset-typed/trunk/ghc9.patch) ------------+ PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ ghc9.patch | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) Copied: haskell-ixset-typed/repos/community-staging-x86_64/PKGBUILD (from rev 1103599, haskell-ixset-typed/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2022-01-14 23:00:18 UTC (rev 1103600) @@ -0,0 +1,49 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=ixset-typed +pkgname=haskell-ixset-typed +pkgver=0.5 +pkgrel=217 +pkgdesc="Efficient relational queries on Haskell sets" +url="https://hackage.haskell.org/package/${_hkgname}" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-safecopy' 'haskell-syb') +makedepends=('ghc' 'haskell-hunit' 'haskell-quickcheck' 'haskell-tasty' 'haskell-tasty-hunit' + 'haskell-tasty-quickcheck') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz + ghc9.patch) +sha512sums=('0f25a540835805cdea68b46de5956afa887172cf16135f7d13e1c1f59e750652defae74d3ecebdacdb606ddf3bdc515c370e0b57f7ada21e3aa3f6e1b62fe582' + '4febefe2d34337482033ad4bfb28ec037323b176127e4a015244d630f8c5071a685d967a633cf64016865b095eb8f473abd5ec829bdf51c431e00ccd478abb0a') + +prepare() { + patch -d $_hkgname-$pkgver -p1 < ghc9.patch +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm + runhaskell Setup build $MAKEFLAGS + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test --show-details=direct +} + +package() { + cd $_hkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/COPYING" +} Copied: haskell-ixset-typed/repos/community-staging-x86_64/ghc9.patch (from rev 1103599, haskell-ixset-typed/trunk/ghc9.patch) =================================================================== --- community-staging-x86_64/ghc9.patch (rev 0) +++ community-staging-x86_64/ghc9.patch 2022-01-14 23:00:18 UTC (rev 1103600) @@ -0,0 +1,54 @@ +commit fb8a9ae632ae7685e7fe9e1f9024b22f2e980b4a +Author: Felix Yan <felixonm...@archlinux.org> +Date: Tue Jun 22 09:59:29 2021 +0800 + + Add support for template-haskell 2.17 + +diff --git a/ixset-typed.cabal b/ixset-typed.cabal +index 458577b..43c784c 100644 +--- a/ixset-typed.cabal ++++ b/ixset-typed.cabal +@@ -38,7 +38,7 @@ library + deepseq >= 1.3 && < 2, + safecopy >= 0.8 && < 0.11, + syb >= 0.4 && < 1, +- template-haskell >= 2.8 && < 2.17 ++ template-haskell >= 2.8 && < 2.18 + + hs-source-dirs: src + exposed-modules: +diff --git a/src/Data/IxSet/Typed.hs b/src/Data/IxSet/Typed.hs +index 75be66d..fc628ea 100644 +--- a/src/Data/IxSet/Typed.hs ++++ b/src/Data/IxSet/Typed.hs +@@ -594,7 +594,13 @@ inferIxSet ixset typeName calName entryPoints + getCalType t' = error ("Unexpected type in getCalType: " ++ pprint t') + -} + mkEntryPoint n = (conE 'Ix) `appE` +- (sigE (varE 'Map.empty) (forallT binders (return context) $ ++ (sigE (varE 'Map.empty) (forallT ++#if MIN_VERSION_template_haskell(2,17,0) ++ (map (SpecifiedSpec <$) binders) ++#else ++ binders ++#endif ++ (return context) $ + appT (appT (conT ''Map) (conT n)) + (appT (conT ''Set) typeCon))) `appE` + (varE 'flattenWithCalcs `appE` varE calName) +@@ -610,9 +616,15 @@ inferIxSet ixset typeName calName entryPoints + return $ [i, ixType'] -- ++ d + _ -> error "IxSet.inferIxSet calInfo unexpected match" + ++#if MIN_VERSION_template_haskell(2,17,0) ++tyVarBndrToName :: TyVarBndr () -> Name ++tyVarBndrToName (PlainTV nm _) = nm ++tyVarBndrToName (KindedTV nm _ _) = nm ++#else + tyVarBndrToName :: TyVarBndr -> Name + tyVarBndrToName (PlainTV nm) = nm + tyVarBndrToName (KindedTV nm _) = nm ++#endif + + -- | Generically traverses the argument to find all occurences of + -- values of type @b@ and returns them as a list.