[arch-commits] Commit in haskell-language-haskell-extract/trunk (2 files)

Felix Yan felixonmars at archlinux.org
Thu Apr 23 14:51:19 UTC 2020


    Date: Thursday, April 23, 2020 @ 14:51:16
  Author: felixonmars
Revision: 618226

upgpkg: haskell-language-haskell-extract 0.2.4-5: rebuild with ghc 8.10.1

Added:
  haskell-language-haskell-extract/trunk/ghc-8.10.patch
Modified:
  haskell-language-haskell-extract/trunk/PKGBUILD

----------------+
 PKGBUILD       |   13 ++++++++++---
 ghc-8.10.patch |   22 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-23 14:47:23 UTC (rev 618225)
+++ PKGBUILD	2020-04-23 14:51:16 UTC (rev 618226)
@@ -3,7 +3,7 @@
 _hkgname=language-haskell-extract
 pkgname=haskell-language-haskell-extract
 pkgver=0.2.4
-pkgrel=4
+pkgrel=5
 pkgdesc="Module to automatically extract functions from the local code"
 url="https://github.com/finnsson/language-haskell-extract"
 license=('BSD')
@@ -10,9 +10,16 @@
 arch=('x86_64')
 depends=('ghc-libs' 'haskell-regex-posix')
 makedepends=('ghc')
-source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
-sha512sums=('6408459abf9d531ccbe7d65766d38fcb93f4d3f9c77db1a706231bf6d8ad6f845fcefc4fbb03833f45c74f21f324a44760f3c89ff093c69f1f9999e64344ab4d')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+        ghc-8.10.patch)
+sha512sums=('6408459abf9d531ccbe7d65766d38fcb93f4d3f9c77db1a706231bf6d8ad6f845fcefc4fbb03833f45c74f21f324a44760f3c89ff093c69f1f9999e64344ab4d'
+            '2992e1e0ca320b4689388e8ff0588611de0ae54ea1c0dde537cda708957e95f2c03f56d818862470ca354d321f032867546cf2c1c72bfeec148fe71befcd9e32')
 
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p1 -i ../ghc-8.10.patch
+}
+
 build() {
     cd $_hkgname-$pkgver
 

Added: ghc-8.10.patch
===================================================================
--- ghc-8.10.patch	                        (rev 0)
+++ ghc-8.10.patch	2020-04-23 14:51:16 UTC (rev 618226)
@@ -0,0 +1,22 @@
+diff --git a/src/Language/Haskell/Extract.hs b/src/Language/Haskell/Extract.hs
+index 3e8958b..43dfe04 100644
+--- a/src/Language/Haskell/Extract.hs
++++ b/src/Language/Haskell/Extract.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ module Language.Haskell.Extract (
+   functionExtractor,
+   functionExtractorMap,
+@@ -25,7 +26,11 @@ extractAllFunctions pattern =
+ functionExtractor :: String -> ExpQ
+ functionExtractor pattern =
+   do functions <- extractAllFunctions pattern
+-     let makePair n = TupE [ LitE $ StringL n , VarE $ mkName n]
++     let makePair n = TupE
++#if MIN_VERSION_template_haskell(2,16,0)
++                           $ map Just
++#endif
++                           [ LitE $ StringL n , VarE $ mkName n]
+      return $ ListE $ map makePair functions
+ 
+ 



More information about the arch-commits mailing list