Date: Tuesday, July 13, 2021 @ 03:38:23 Author: felixonmars Revision: 976718
upgpkg: haskell-polysemy 1.6.0.0-1: rebuild with polysemy 1.6.0.0 Modified: haskell-polysemy/trunk/PKGBUILD Deleted: haskell-polysemy/trunk/ghc9.patch ------------+ PKGBUILD | 21 ++------ ghc9.patch | 147 ----------------------------------------------------------- 2 files changed, 6 insertions(+), 162 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-07-13 03:25:21 UTC (rev 976717) +++ PKGBUILD 2021-07-13 03:38:23 UTC (rev 976718) @@ -2,28 +2,19 @@ _hkgname=polysemy pkgname=haskell-polysemy -pkgver=1.5.0.0 -pkgrel=18 +pkgver=1.6.0.0 +pkgrel=1 pkgdesc="Higher-order, low-boilerplate, zero-cost free monads" url="https://github.com/isovector/polysemy" license=('BSD') arch=('x86_64') depends=('ghc-libs' 'haskell-quickcheck' 'haskell-async' 'haskell-first-class-families' 'haskell-syb' - 'haskell-th-abstraction' 'haskell-type-errors' 'haskell-type-errors-pretty' - 'haskell-unagi-chan') -makedepends=('ghc' 'uusi' 'haskell-cabal-doctest' 'haskell-hspec-discover' 'haskell-doctest' 'haskell-hspec' + 'haskell-th-abstraction' 'haskell-type-errors' 'haskell-unagi-chan') +makedepends=('ghc' 'haskell-cabal-doctest' 'haskell-hspec-discover' 'haskell-doctest' 'haskell-hspec' 'haskell-inspection-testing') -source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz" - ghc9.patch) -sha512sums=('4cc5c348b75e6bdf7b15c926786a4bd6fec2c6aa5e0862d865aefe8a49e7ce5eadd1203b641fa4c9e398a04bd66def40196725fbdee479ded8661b5bea3bb99e' - '6bef2b9dac5a600d36aafabd3dffa3c5d81c3aff80cf039c9c2e1a2c39d5bd3e9ca234bb8b3366aae12c386c21a3922d8d68993367d5a35a9b21e0e5f0a86bcb') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha512sums=('9b053ea9a06abcadacd42db8dac913e140129d9d37e93f949c4b15493b465eeb8db55a19c5c450055f5b6856cf4683d3165b74350f0e68e0d3a6e3fa1e3d9064') -prepare() { - cd $_hkgname-$pkgver - patch -p1 -i ../ghc9.patch - uusi -u doctest $_hkgname.cabal -} - build() { cd $_hkgname-$pkgver Deleted: ghc9.patch =================================================================== --- ghc9.patch 2021-07-13 03:25:21 UTC (rev 976717) +++ ghc9.patch 2021-07-13 03:38:23 UTC (rev 976718) @@ -1,147 +0,0 @@ -From 23c9912f6ac665e54096a436e9ef63b98ad5ecb4 Mon Sep 17 00:00:00 2001 -From: Torsten Schmits <torstenschm...@gmail.com> -Date: Sat, 17 Apr 2021 01:35:20 +0200 -Subject: [PATCH 1/4] start migration to ghc9 - ---- - flake.lock | 43 +++++++++++++++++++-------- - flake.nix | 37 +++++++++++++++-------- - nix/overlay.nix | 32 ++++++++------------ - polysemy-plugin/package.yaml | 4 +-- - polysemy-plugin/polysemy-plugin.cabal | 6 ++-- - src/Polysemy/Internal.hs | 2 +- - src/Polysemy/Internal/Combinators.hs | 4 +-- - src/Polysemy/Internal/TH/Common.hs | 26 ++++++++++++++-- - src/Polysemy/Internal/TH/Effect.hs | 2 +- - src/Polysemy/Internal/Tactics.hs | 2 +- - 10 files changed, 100 insertions(+), 58 deletions(-) - -diff --git a/src/Polysemy/Internal.hs b/src/Polysemy/Internal.hs -index 9c06df4..dcc7c24 100644 ---- a/src/Polysemy/Internal.hs -+++ b/src/Polysemy/Internal.hs -@@ -267,7 +267,7 @@ instance Functor (Sem f) where - - - instance Applicative (Sem f) where -- pure a = Sem $ const $ pure a -+ pure a = Sem $ \_ -> pure a - {-# INLINE pure #-} - - Sem f <*> Sem a = Sem $ \k -> f k <*> a k -diff --git a/src/Polysemy/Internal/Combinators.hs b/src/Polysemy/Internal/Combinators.hs -index dd8b459..b67751c 100644 ---- a/src/Polysemy/Internal/Combinators.hs -+++ b/src/Polysemy/Internal/Combinators.hs -@@ -59,7 +59,7 @@ firstOrder higher f = higher $ \(e :: e (Sem rInitial) x) -> - -- transforming it into other effects inside of @r@. - interpret - :: FirstOrder e "interpret" -- => (∀ x rInitial. e (Sem rInitial) x -> Sem r x) -+ => (∀ rInitial x. e (Sem rInitial) x -> Sem r x) - -- ^ A natural transformation from the handled effect to other effects - -- already in 'Sem'. - -> Sem (e ': r) a -@@ -75,7 +75,7 @@ interpret = firstOrder interpretH - -- - -- See the notes on 'Tactical' for how to use this function. - interpretH -- :: (∀ x rInitial . e (Sem rInitial) x -> Tactical e (Sem rInitial) r x) -+ :: (∀ rInitial x . e (Sem rInitial) x -> Tactical e (Sem rInitial) r x) - -- ^ A natural transformation from the handled effect to other effects - -- already in 'Sem'. - -> Sem (e ': r) a -diff --git a/src/Polysemy/Internal/TH/Common.hs b/src/Polysemy/Internal/TH/Common.hs -index 8296df6..2130157 100644 ---- a/src/Polysemy/Internal/TH/Common.hs -+++ b/src/Polysemy/Internal/TH/Common.hs -@@ -215,7 +215,11 @@ missingEffArgs name = fail $ show - ) - where - base = capturableBase name -+#if MIN_VERSION_template_haskell(2,17,0) -+ args = flip PlainTV () . mkName <$> ["m", "a"] -+#else - args = PlainTV . mkName <$> ["m", "a"] -+#endif - - notDataCon :: Name -> Q a - notDataCon name = fail $ show -@@ -226,12 +230,20 @@ notDataCon name = fail $ show - -- TH utilities -------------------------------------------------------------- - ------------------------------------------------------------------------------ - -+arrows :: Type -> Bool -+arrows = \case -+ ArrowT -> True -+#if MIN_VERSION_template_haskell(2,17,0) -+ AppT MulArrowT _ -> True -+#endif -+ _ -> False -+ - ------------------------------------------------------------------------------ - -- | Pattern constructing function type and matching on one that may contain - -- type annotations on arrow itself. - infixr 1 :-> - pattern (:->) :: Type -> Type -> Type --pattern a :-> b <- (removeTyAnns -> ArrowT) `AppT` a `AppT` b where -+pattern a :-> b <- (arrows . removeTyAnns -> True) `AppT` a `AppT` b where - a :-> b = ArrowT `AppT` a `AppT` b - - -@@ -249,8 +261,13 @@ capturableTVars = everywhere $ mkT $ \case - VarT n -> VarT $ capturableBase n - ForallT bs cs t -> ForallT (goBndr <$> bs) (capturableTVars <$> cs) t - where -+#if MIN_VERSION_template_haskell(2,17,0) -+ goBndr (PlainTV n flag) = PlainTV (capturableBase n) flag -+ goBndr (KindedTV n flag k) = KindedTV (capturableBase n) flag $ capturableTVars k -+#else - goBndr (PlainTV n ) = PlainTV $ capturableBase n - goBndr (KindedTV n k) = KindedTV (capturableBase n) $ capturableTVars k -+#endif - t -> t - - -@@ -274,8 +291,13 @@ simplifyKinds = everywhere $ mkT $ \case - SigT t VarT{} -> t - ForallT bs cs t -> ForallT (goBndr <$> bs) (simplifyKinds <$> cs) t - where -- goBndr (KindedTV n StarT ) = PlainTV n -+#if MIN_VERSION_template_haskell(2,17,0) -+ goBndr (KindedTV n flag StarT) = PlainTV n flag -+ goBndr (KindedTV n flag VarT{}) = PlainTV n flag -+#else -+ goBndr (KindedTV n StarT) = PlainTV n - goBndr (KindedTV n VarT{}) = PlainTV n -+#endif - goBndr b = b - t -> t - -diff --git a/src/Polysemy/Internal/TH/Effect.hs b/src/Polysemy/Internal/TH/Effect.hs -index 12de450..12fa2fc 100644 ---- a/src/Polysemy/Internal/TH/Effect.hs -+++ b/src/Polysemy/Internal/TH/Effect.hs -@@ -108,7 +108,7 @@ makeSem_ :: Name -> Q [Dec] - makeSem_ = genFreer False - -- NOTE(makeSem_): - -- This function uses an ugly hack to work --- it changes names in data ---- constructor's type to capturable ones. This allows user to provide them to -+-- constructor's type to capturable ones. This allows users to provide them to - -- us from their signature through 'forall' with 'ScopedTypeVariables' - -- enabled, so that we can compile liftings of constructors with ambiguous - -- type arguments (see issue #48). -diff --git a/src/Polysemy/Internal/Tactics.hs b/src/Polysemy/Internal/Tactics.hs -index d12a036..5c46cdd 100644 ---- a/src/Polysemy/Internal/Tactics.hs -+++ b/src/Polysemy/Internal/Tactics.hs -@@ -127,7 +127,7 @@ newtype Inspector f = Inspector - - ------------------------------------------------------------------------------ - -- | Lift a value into 'Tactical'. --pureT :: a -> Tactical e m r a -+pureT :: Functor f => a -> Sem (WithTactics e f m r) (f a) - pureT a = do - istate <- getInitialStateT - pure $ a <$ istate -