Date: Monday, December 10, 2018 @ 00:59:49 Author: felixonmars Revision: 413614
archrelease: copy trunk to community-staging-x86_64 Added: haskell-language-python/repos/community-staging-x86_64/ haskell-language-python/repos/community-staging-x86_64/PKGBUILD (from rev 413613, haskell-language-python/trunk/PKGBUILD) haskell-language-python/repos/community-staging-x86_64/ghc-8.2.1.patch (from rev 413613, haskell-language-python/trunk/ghc-8.2.1.patch) -----------------+ PKGBUILD | 51 ++++++++++++++++++ ghc-8.2.1.patch | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+) Copied: haskell-language-python/repos/community-staging-x86_64/PKGBUILD (from rev 413613, haskell-language-python/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2018-12-10 00:59:49 UTC (rev 413614) @@ -0,0 +1,51 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=language-python +pkgname=haskell-language-python +pkgver=0.5.4 +pkgrel=11 +pkgdesc="Parsing and pretty printing of Python code." +url="https://hackage.haskell.org/package/${_hkgname}" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-monads-tf' 'haskell-utf8-string') +makedepends=('happy' 'alex' 'ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz" + ghc-8.2.1.patch) +sha512sums=('adbe81eeb4a161c8e685c3dacdee0924f1193fa291a753e1608f0c94effc90b77df60fee1e46e791516d01ea0153f243c13fb2fdd24d688cfe9ce8ac9ed44059' + 'ce812b6937158977a85c2b5c1118a79779570bd4023ac58b22d9e2960e24be98b107e733c3ed90ed9977d20e757d56c6e2e3ea48d473f3e6d42589fa2c8281ea') + +prepare() { + cd $_hkgname-$pkgver + patch -p1 -i ../ghc-8.2.1.patch + + sed -i 's/== *0.5/==0.6/' $_hkgname.cabal + + sed -i '/import Data.Data/i import Prelude hiding ((<>))' src/Language/Python/Common/SrcLocation.hs + sed -i '/import Language.Python.Common.AST/i import Prelude hiding ((<>))' src/Language/Python/Common/PrettyAST.hs +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + -fsplit-base + runhaskell Setup build + 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 +} + +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-language-python/repos/community-staging-x86_64/ghc-8.2.1.patch (from rev 413613, haskell-language-python/trunk/ghc-8.2.1.patch) =================================================================== --- community-staging-x86_64/ghc-8.2.1.patch (rev 0) +++ community-staging-x86_64/ghc-8.2.1.patch 2018-12-10 00:59:49 UTC (rev 413614) @@ -0,0 +1,150 @@ +From 416a0981a6c0185d5aa905a5de31bc8024ef1099 Mon Sep 17 00:00:00 2001 +From: Sergey Vinokurov <serg....@gmail.com> +Date: Mon, 31 Jul 2017 23:18:58 +0300 +Subject: [PATCH] Fix unused import warnings and simultaneously fix ghc 8.2.1 + build + +--- + language-python.cabal | 9 +++++---- + src/Language/Python/Common.hs | 6 +++--- + src/Language/Python/Common/LexerUtils.hs | 5 +---- + src/Language/Python/Common/ParseError.hs | 1 - + src/Language/Python/Common/ParserMonad.hs | 3 --- + src/Language/Python/Common/Token.hs | 2 +- + src/Language/Python/Version2/Parser.hs | 2 +- + src/Language/Python/Version2/Parser/Lexer.x | 3 --- + src/Language/Python/Version3/Parser.hs | 2 +- + 9 files changed, 12 insertions(+), 21 deletions(-) + +diff --git a/language-python.cabal b/language-python.cabal +index 2bb36b1..bb9d442 100644 +--- a/language-python.cabal ++++ b/language-python.cabal +@@ -13,10 +13,11 @@ maintainer: florbit...@gmail.com + homepage: http://github.com/bjpop/language-python + build-type: Simple + stability: experimental +-extra-source-files: src/Language/Python/Version3/Parser/Parser.y +- src/Language/Python/Version3/Parser/Lexer.x +- src/Language/Python/Version2/Parser/Parser.y +- src/Language/Python/Version2/Parser/Lexer.x ++extra-source-files: src/Language/Python/Version3/Parser/Parser.y ++ src/Language/Python/Version3/Parser/Lexer.x ++ src/Language/Python/Version2/Parser/Parser.y ++ src/Language/Python/Version2/Parser/Lexer.x ++tested-with: GHC ==7.8.4, GHC ==7.10.3, GHC ==8.0.2, GHC ==8.2.1 + + source-repository head + type: git +diff --git a/src/Language/Python/Common.hs b/src/Language/Python/Common.hs +index 6fe22a6..871a434 100644 +--- a/src/Language/Python/Common.hs ++++ b/src/Language/Python/Common.hs +@@ -33,8 +33,8 @@ module Language.Python.Common ( + import Language.Python.Common.Pretty + import Language.Python.Common.Token + import Language.Python.Common.AST +-import Language.Python.Common.PrettyAST +-import Language.Python.Common.PrettyToken ++import Language.Python.Common.PrettyAST () ++import Language.Python.Common.PrettyToken () + import Language.Python.Common.SrcLocation +-import Language.Python.Common.PrettyParseError ++import Language.Python.Common.PrettyParseError () + import Language.Python.Common.ParseError +diff --git a/src/Language/Python/Common/LexerUtils.hs b/src/Language/Python/Common/LexerUtils.hs +index 6aa00d6..fea39a1 100644 +--- a/src/Language/Python/Common/LexerUtils.hs ++++ b/src/Language/Python/Common/LexerUtils.hs +@@ -16,11 +16,8 @@ module Language.Python.Common.LexerUtils where + import Control.Monad (liftM) + import Control.Monad.Error.Class (throwError) + import Data.List (foldl') +-import Data.Map as Map hiding (null, map, foldl') + import Data.Word (Word8) +-import Data.Char (ord) +-import Numeric (readHex, readOct) +-import Language.Python.Common.Token as Token ++import Language.Python.Common.Token as Token + import Language.Python.Common.ParserMonad hiding (location) + import Language.Python.Common.SrcLocation + import Codec.Binary.UTF8.String as UTF8 (encode) +diff --git a/src/Language/Python/Common/ParseError.hs b/src/Language/Python/Common/ParseError.hs +index 77e9eb9..53b33ef 100644 +--- a/src/Language/Python/Common/ParseError.hs ++++ b/src/Language/Python/Common/ParseError.hs +@@ -12,7 +12,6 @@ + + module Language.Python.Common.ParseError ( ParseError (..) ) where + +-import Language.Python.Common.Pretty + import Language.Python.Common.SrcLocation (SrcLocation) + import Language.Python.Common.Token (Token) + import Control.Monad.Error.Class +diff --git a/src/Language/Python/Common/ParserMonad.hs b/src/Language/Python/Common/ParserMonad.hs +index 0087576..3c1c1fa 100644 +--- a/src/Language/Python/Common/ParserMonad.hs ++++ b/src/Language/Python/Common/ParserMonad.hs +@@ -52,9 +52,6 @@ import Control.Applicative ((<$>)) + import Control.Monad.State.Class + import Control.Monad.State.Strict as State + import Control.Monad.Error as Error +-import Control.Monad.Error.Class +-import Control.Monad.Identity as Identity +-import Control.Monad.Trans as Trans + import Language.Python.Common.Pretty + + internalError :: String -> P a +diff --git a/src/Language/Python/Common/Token.hs b/src/Language/Python/Common/Token.hs +index d7840e8..5893590 100644 +--- a/src/Language/Python/Common/Token.hs ++++ b/src/Language/Python/Common/Token.hs +@@ -25,7 +25,7 @@ module Language.Python.Common.Token ( + ) where + + import Language.Python.Common.Pretty +-import Language.Python.Common.SrcLocation (SrcSpan (..), SrcLocation (..), Span(getSpan)) ++import Language.Python.Common.SrcLocation (SrcSpan (..), Span(getSpan)) + import Data.Data + + -- | Lexical tokens. +diff --git a/src/Language/Python/Version2/Parser.hs b/src/Language/Python/Version2/Parser.hs +index e2379c4..1df90a6 100644 +--- a/src/Language/Python/Version2/Parser.hs ++++ b/src/Language/Python/Version2/Parser.hs +@@ -35,7 +35,7 @@ import Language.Python.Version2.Parser.Lexer (initStartCodeStack) + import Language.Python.Common.AST (ModuleSpan, StatementSpan, ExprSpan) + import Language.Python.Common.Token (Token) + import Language.Python.Common.SrcLocation (initialSrcLocation) +-import Language.Python.Common.ParserMonad (execParser, execParserKeepComments, ParseError, initialState) ++import Language.Python.Common.ParserMonad (execParserKeepComments, ParseError, initialState) + + -- | Parse a whole Python source file. Return comments in addition to the parsed module. + parseModule :: String -- ^ The input stream (python module source code). +diff --git a/src/Language/Python/Version2/Parser/Lexer.x b/src/Language/Python/Version2/Parser/Lexer.x +index 5b0458f..4e0e746 100644 +--- a/src/Language/Python/Version2/Parser/Lexer.x ++++ b/src/Language/Python/Version2/Parser/Lexer.x +@@ -20,9 +20,6 @@ import Language.Python.Common.ParserMonad hiding (location) + import Language.Python.Common.SrcLocation + import Language.Python.Common.LexerUtils + import qualified Data.Map as Map +-import Control.Monad (liftM) +-import Data.List (foldl') +-import Numeric (readHex, readOct) + } + + -- character sets +diff --git a/src/Language/Python/Version3/Parser.hs b/src/Language/Python/Version3/Parser.hs +index 24ff613..1cd5f8f 100644 +--- a/src/Language/Python/Version3/Parser.hs ++++ b/src/Language/Python/Version3/Parser.hs +@@ -35,7 +35,7 @@ import Language.Python.Version3.Parser.Lexer (initStartCodeStack) + import Language.Python.Common.AST (ModuleSpan, StatementSpan, ExprSpan) + import Language.Python.Common.Token (Token) + import Language.Python.Common.SrcLocation (initialSrcLocation) +-import Language.Python.Common.ParserMonad (execParser, execParserKeepComments, ParseError, initialState) ++import Language.Python.Common.ParserMonad (execParserKeepComments, ParseError, initialState) + + -- | Parse a whole Python source file. Return comments in addition to the parsed module. + parseModule :: String -- ^ The input stream (python module source code).