Date: Sunday, December 25, 2022 @ 21:40:03
  Author: felixonmars
Revision: 1367147

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-lsp/repos/community-staging-x86_64/
  haskell-lsp/repos/community-staging-x86_64/PKGBUILD
    (from rev 1367146, haskell-lsp/trunk/PKGBUILD)
  haskell-lsp/repos/community-staging-x86_64/lsp-aeson-2.patch
    (from rev 1367146, haskell-lsp/trunk/lsp-aeson-2.patch)

-------------------+
 PKGBUILD          |   59 +++++++++++++++++++++++++++++++++++++++
 lsp-aeson-2.patch |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 137 insertions(+)

Copied: haskell-lsp/repos/community-staging-x86_64/PKGBUILD (from rev 1367146, 
haskell-lsp/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2022-12-25 21:40:03 UTC (rev 1367147)
@@ -0,0 +1,59 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=lsp
+pkgname=haskell-lsp
+pkgver=1.2.0.1
+pkgrel=154
+pkgdesc="Haskell library for the Microsoft Language Server Protocol"
+url="https://github.com/haskell/lsp";
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-async' 'haskell-attoparsec' 
'haskell-data-default'
+         'haskell-dependent-map' 'haskell-hashable' 'haskell-hslogger'
+         'haskell-lens' 'haskell-lsp-types' 'haskell-network-uri' 
'haskell-random'
+         'haskell-scientific' 'haskell-sorted-list' 'haskell-unliftio-core'
+         'haskell-unordered-containers' 'haskell-uuid' 'haskell-unliftio')
+makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-hspec' 
'haskell-hspec-discover'
+             'haskell-quickcheck-instances' 'haskell-rope-utf16-splay')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz";
+        lsp-aeson-2.patch)
+sha512sums=('77c79d06cec9bf5fab707c9c1907ca8428ba15f763cad16c5a4b18fb4ee80a1b04770c2b9579d0f4ba31b16f71c2296501c2bd2d3da2475974b42e3c7daf3838'
+            
'99fe0e6948f850731980f25138a7a8bdc649b8f1beb852756dc58f3208b66b8e46b3f472467a3d6140eab13a5734a2274cd0373e54facf93c862ae4021adb7b8')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  patch -p2 -i ../lsp-aeson-2.patch
+  gen-setup
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname 
--enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid 
--ghc-option=-fllvm \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' \
+    -fdemo
+
+  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 -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}

Copied: haskell-lsp/repos/community-staging-x86_64/lsp-aeson-2.patch (from rev 
1367146, haskell-lsp/trunk/lsp-aeson-2.patch)
===================================================================
--- community-staging-x86_64/lsp-aeson-2.patch                          (rev 0)
+++ community-staging-x86_64/lsp-aeson-2.patch  2022-12-25 21:40:03 UTC (rev 
1367147)
@@ -0,0 +1,78 @@
+From b2353bc99d31dd41e3f4a03b993bc13b2e2f4802 Mon Sep 17 00:00:00 2001
+From: Michael Peyton Jones <[email protected]>
+Date: Sat, 30 Oct 2021 18:08:23 +0100
+Subject: [PATCH] Aeson 2 compatibility
+
+We get compatibility with both <2 and >=2 by using only functions that
+appear in both, which don't make assumptions about the structure of
+objects.
+
+Fixes #356
+---
+ lsp-types/src/Language/LSP/Types/Common.hs  |  3 +-
+ lsp-types/src/Language/LSP/Types/Message.hs |  6 +--
+ lsp-types/src/Language/LSP/Types/Parsing.hs | 56 +++++++++++----------
+ lsp/example/Reactor.hs                      |  5 +-
+ 4 files changed, 35 insertions(+), 35 deletions(-)
+
+diff --git a/lsp/example/Reactor.hs b/lsp/example/Reactor.hs
+index cbe7d796..a4c3a817 100644
+--- a/lsp/example/Reactor.hs
++++ b/lsp/example/Reactor.hs
+@@ -30,7 +30,6 @@ import           Control.Monad
+ import           Control.Monad.IO.Class
+ import           Control.Monad.STM
+ import qualified Data.Aeson                            as J
+-import qualified Data.HashMap.Strict                   as H
+ import qualified Data.Text                             as T
+ import           GHC.Generics (Generic)
+ import           Language.LSP.Server
+@@ -263,8 +262,8 @@ handle = mconcat
+               cmd = "lsp-hello-command"
+               -- need 'file' and 'start_pos'
+               args = J.List
+-                      [ J.Object $ H.fromList [("file",     J.Object $ 
H.fromList [("textDocument",J.toJSON doc)])]
+-                      , J.Object $ H.fromList [("start_pos",J.Object $ 
H.fromList [("position",    J.toJSON start)])]
++                      [ J.object [("file",     J.object 
[("textDocument",J.toJSON doc)])]
++                      , J.object [("start_pos",J.object [("position",    
J.toJSON start)])]
+                       ]
+               cmdparams = Just args
+           makeCommand (J.Diagnostic _r _s _c _source _m _t _l) = []
+From c974bb0eaa204791c5abb7d051fe5b92ee018d80 Mon Sep 17 00:00:00 2001
+From: Kobayashi <[email protected]>
+Date: Tue, 4 Jan 2022 22:20:20 +0800
+Subject: [PATCH] fix textDocument/selectionRange's method (#388)
+
+* fix selection range
+
+* remove Arbitrary instance for Value when aeson provides it
+---
+ lsp-types/src/Language/LSP/Types/Method.hs | 2 +-
+ lsp/test/JsonSpec.hs                       | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lsp/test/JsonSpec.hs b/lsp/test/JsonSpec.hs
+index 7d77e940..ab95dbf0 100644
+--- a/lsp/test/JsonSpec.hs
++++ b/lsp/test/JsonSpec.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP                  #-}
+ {-# LANGUAGE UndecidableInstances #-}
+ {-# LANGUAGE FlexibleContexts     #-}
+ {-# LANGUAGE TypeInType           #-}
+@@ -159,6 +160,7 @@ smallList = resize 3 . listOf
+ instance (Arbitrary a) => Arbitrary (List a) where
+   arbitrary = List <$> arbitrary
+ 
++#if !MIN_VERSION_aeson(2,0,3)
+ instance Arbitrary J.Value where
+   arbitrary = oneof
+     [ J.String <$> arbitrary
+@@ -166,6 +168,7 @@ instance Arbitrary J.Value where
+     , J.Bool <$> arbitrary
+     , pure J.Null
+     ]
++#endif
+ 
+ -- ---------------------------------------------------------------------
+ 

Reply via email to