Date: Thursday, June 17, 2021 @ 00:25:35 Author: felixonmars Revision: 964479
archrelease: copy trunk to community-staging-x86_64 Added: haskell-generic-lens-core/repos/community-staging-x86_64/ haskell-generic-lens-core/repos/community-staging-x86_64/PKGBUILD (from rev 964478, haskell-generic-lens-core/trunk/PKGBUILD) haskell-generic-lens-core/repos/community-staging-x86_64/ghc9.patch (from rev 964478, haskell-generic-lens-core/trunk/ghc9.patch) ------------+ PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ ghc9.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) Copied: haskell-generic-lens-core/repos/community-staging-x86_64/PKGBUILD (from rev 964478, haskell-generic-lens-core/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-06-17 00:25:35 UTC (rev 964479) @@ -0,0 +1,49 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=generic-lens-core +pkgname=haskell-generic-lens-core +pkgver=2.1.0.0 +pkgrel=5 +pkgdesc="Generically derive traversals, lenses and prisms" +url="https://github.com/kcsongor/generic-lens" +license=('BSD') +arch=('x86_64') +depends=('ghc-libs' 'haskell-indexed-profunctors') +makedepends=('ghc') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz + ghc9.patch) +sha512sums=('9a64ab9a2f7c0f485088ef0e5a6bb75668a8a7a9c059f566b3ec4145f38edc35f49331e7d2553f6f7753f2a02fb9bad461c978e90c44f65b878b3d70bddda291' + 'ce5d9531e8a0755bde320c98fc06e49355220d731d98dd94b657155e7aa769c8617f2c1486fbf622fa449a9a07a97aec0b986ad8e3dbc270da65c0d2c0d97d79') + +prepare() { + # https://github.com/kcsongor/generic-lens/pull/130 + patch -d $_hkgname-$pkgver -p2 < 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 + 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 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +} Copied: haskell-generic-lens-core/repos/community-staging-x86_64/ghc9.patch (from rev 964478, haskell-generic-lens-core/trunk/ghc9.patch) =================================================================== --- community-staging-x86_64/ghc9.patch (rev 0) +++ community-staging-x86_64/ghc9.patch 2021-06-17 00:25:35 UTC (rev 964479) @@ -0,0 +1,40 @@ +From b4fc120730a84cb42ee0c1ad27cce043194249fb Mon Sep 17 00:00:00 2001 +From: amesgen <ames...@amesgen.de> +Date: Thu, 4 Feb 2021 18:43:16 +0100 +Subject: [PATCH 1/2] update to GHC 9.0 + +--- + .../src/Data/Generics/Internal/Profunctor/Iso.hs | 2 +- + .../src/Data/Generics/Internal/Profunctor/Prism.hs | 4 ++-- + generic-lens/src/Data/Generics/Internal/VL/Iso.hs | 2 +- + generic-lens/src/Data/Generics/Internal/VL/Prism.hs | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/generic-lens-core/src/Data/Generics/Internal/Profunctor/Iso.hs b/generic-lens-core/src/Data/Generics/Internal/Profunctor/Iso.hs +index 31de61c..31210d5 100644 +--- a/generic-lens-core/src/Data/Generics/Internal/Profunctor/Iso.hs ++++ b/generic-lens-core/src/Data/Generics/Internal/Profunctor/Iso.hs +@@ -73,7 +73,7 @@ fromIso l = withIso l $ \ sa bt -> iso bt sa + {-# INLINE fromIso #-} + + iso :: (s -> a) -> (b -> t) -> Iso s t a b +-iso = dimap ++iso sa bt = dimap sa bt + {-# INLINE iso #-} + + withIso :: Iso s t a b -> ((s -> a) -> (b -> t) -> r) -> r +diff --git a/generic-lens-core/src/Data/Generics/Internal/Profunctor/Prism.hs b/generic-lens-core/src/Data/Generics/Internal/Profunctor/Prism.hs +index fd05757..dc032aa 100644 +--- a/generic-lens-core/src/Data/Generics/Internal/Profunctor/Prism.hs ++++ b/generic-lens-core/src/Data/Generics/Internal/Profunctor/Prism.hs +@@ -60,8 +60,8 @@ match k = withPrism k $ \_ _match -> _match + -- Prism stuff + + without' :: Prism s t a b -> Prism s t c d -> Prism s t (Either a c) (Either b d) +-without' k = +- withPrism k $ \bt _ k' -> ++without' k k' = ++ withPrism k $ \bt _ -> + withPrism k' $ \dt setc -> + prism (either bt dt) $ \s -> fmap Right (setc s) + {-# INLINE without' #-}