[arch-commits] Commit in haskell-lsp-types/trunk (PKGBUILD ghc9.patch)

Felix Yan felixonmars at archlinux.org
Tue Jun 22 00:12:09 UTC 2021


    Date: Tuesday, June 22, 2021 @ 00:12:09
  Author: felixonmars
Revision: 966640

upgpkg: haskell-lsp-types 1.2.0.0-15: rebuild with ghc 9.0.1

Added:
  haskell-lsp-types/trunk/ghc9.patch
Modified:
  haskell-lsp-types/trunk/PKGBUILD

------------+
 PKGBUILD   |    9 +++--
 ghc9.patch |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 95 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-21 23:58:18 UTC (rev 966639)
+++ PKGBUILD	2021-06-22 00:12:09 UTC (rev 966640)
@@ -3,7 +3,7 @@
 _hkgname=lsp-types
 pkgname=haskell-lsp-types
 pkgver=1.2.0.0
-pkgrel=14
+pkgrel=15
 pkgdesc="Haskell library for the Microsoft Language Server Protocol, data types"
 url="https://github.com/haskell/lsp"
 license=("MIT")
@@ -13,12 +13,15 @@
          'haskell-network-uri' 'haskell-rope-utf16-splay' 'haskell-scientific' 'haskell-some'
          'haskell-temporary' 'haskell-unordered-containers')
 makedepends=('ghc' 'uusi')
-source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
-sha512sums=('c413f16dac35e7096e439cf7e1b8ec8f1c80b0a7dfea681512ff1dccf9e1d8a436bab38ce2c6ab15a584a5ebceebd96a85a5694ef30889df6275163843cef18a')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+        ghc9.patch)
+sha512sums=('c413f16dac35e7096e439cf7e1b8ec8f1c80b0a7dfea681512ff1dccf9e1d8a436bab38ce2c6ab15a584a5ebceebd96a85a5694ef30889df6275163843cef18a'
+            '9e1ae0c72dba23b7065bc82e412392427aeba8a0cf2ec514b1918570d03f038c42c3dc2d0e23dc9e9efb081238e11c7f82083ee03b6625b683ae257f776c08a5')
 
 prepare() {
   cd $_hkgname-$pkgver
   gen-setup
+  patch -p2 -i ../ghc9.patch
 }
 
 build() {

Added: ghc9.patch
===================================================================
--- ghc9.patch	                        (rev 0)
+++ ghc9.patch	2021-06-22 00:12:09 UTC (rev 966640)
@@ -0,0 +1,89 @@
+From 8f499cec4148da2295f214bac44fe6a2ed8eea55 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= <anka.213 at gmail.com>
+Date: Tue, 30 Mar 2021 10:58:50 +0800
+Subject: [PATCH] Shuffle around TH lines, since ghc-9 seems to have stricter
+ staging rules
+
+---
+ lsp-types/lsp-types.cabal                        | 2 +-
+ lsp-types/src/Language/LSP/Types/Method.hs       | 3 ++-
+ lsp-types/src/Language/LSP/Types/TextDocument.hs | 4 ++--
+ lsp-types/src/Language/LSP/Types/WatchedFiles.hs | 5 ++---
+ lsp/lsp.cabal                                    | 2 +-
+ 5 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/lsp-types/lsp-types.cabal b/lsp-types/lsp-types.cabal
+index 36a383c3..55020743 100644
+--- a/lsp-types/lsp-types.cabal
++++ b/lsp-types/lsp-types.cabal
+@@ -69,7 +69,7 @@ library
+                      , Language.LSP.Types.WorkspaceSymbol
+  -- other-extensions:
+   ghc-options:         -Wall
+-  build-depends:       base >= 4.11 && < 4.15
++  build-depends:       base >= 4.11 && < 4.16
+                      , aeson >=1.2.2.0
+                      , binary
+                      , bytestring
+diff --git a/lsp-types/src/Language/LSP/Types/Method.hs b/lsp-types/src/Language/LSP/Types/Method.hs
+index 89462f5a..90897283 100644
+--- a/lsp-types/src/Language/LSP/Types/Method.hs
++++ b/lsp-types/src/Language/LSP/Types/Method.hs
+@@ -312,7 +312,6 @@ instance A.FromJSON SomeServerMethod where
+   parseJSON _                                                = fail "SomeServerMethod"
+ 
+ -- instance FromJSON (SMethod m)
+-makeSingletonFromJSON 'SomeMethod ''SMethod
+ 
+ -- ---------------------------------------------------------------------
+ -- TO JSON
+@@ -396,3 +395,5 @@ instance A.ToJSON (SMethod m) where
+   toJSON SCancelRequest                      = A.String "$/cancelRequest"
+ -- Custom
+   toJSON (SCustomMethod m)                   = A.String m
++
++makeSingletonFromJSON 'SomeMethod ''SMethod
+diff --git a/lsp-types/src/Language/LSP/Types/TextDocument.hs b/lsp-types/src/Language/LSP/Types/TextDocument.hs
+index 465377a7..b3d7d051 100644
+--- a/lsp-types/src/Language/LSP/Types/TextDocument.hs
++++ b/lsp-types/src/Language/LSP/Types/TextDocument.hs
+@@ -84,6 +84,7 @@ data SaveOptions =
+   { -- | The client is supposed to include the content on save.
+     _includeText :: Maybe Bool
+   } deriving (Show, Read, Eq)
++deriveJSON lspOptions ''SaveOptions
+ 
+ -- -------------------------------------
+ 
+@@ -234,7 +235,6 @@ deriveJSON lspOptions ''WillSaveTextDocumentParams
+ 
+ -- -------------------------------------
+ 
+-deriveJSON lspOptions ''SaveOptions
+ 
+ makeExtendingDatatype "TextDocumentSaveRegistrationOptions"
+   [''TextDocumentRegistrationOptions]
+diff --git a/lsp-types/src/Language/LSP/Types/WatchedFiles.hs b/lsp-types/src/Language/LSP/Types/WatchedFiles.hs
+index 74d26526..38a16bf6 100644
+--- a/lsp-types/src/Language/LSP/Types/WatchedFiles.hs
++++ b/lsp-types/src/Language/LSP/Types/WatchedFiles.hs
+@@ -2,7 +2,7 @@
+ {-# LANGUAGE DuplicateRecordFields #-}
+ 
+ module Language.LSP.Types.WatchedFiles where
+-  
++
+ import Data.Aeson
+ import Data.Aeson.TH
+ import Data.Bits
+@@ -71,9 +71,8 @@ instance FromJSON WatchKind where
+     | otherwise = fail "WatchKind"
+   parseJSON _            = fail "WatchKind"
+ 
+-deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions
+ deriveJSON lspOptions ''FileSystemWatcher
+-
++deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions
+ -- | The file event type.
+ data FileChangeType = FcCreated -- ^ The file got created.
+                     | FcChanged -- ^ The file got changed.



More information about the arch-commits mailing list