Skip to content

Commit

Permalink
Merge pull request #526 from haskell/mpj/9.82
Browse files Browse the repository at this point in the history
9.8
  • Loading branch information
michaelpj authored Nov 13, 2023
2 parents fce5a9c + 560e05f commit 78e3fd1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc-version: ['9.6', '9.4', '9.2', '9.0', '8.10']
ghc-version: ['9.8', '9.6', '9.4', '9.2', '9.0']
# Unlikely that we'll succeed on windows and fail on macos,
# including it is just burning CI time. But windows could have
# path or IO issues, so worth including
Expand Down
7 changes: 6 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
index-state: 2023-07-09T00:00:00Z
index-state: 2023-11-13T00:00:00Z

packages:
./lsp
Expand All @@ -18,3 +18,8 @@ package lsp-types
-- has very many independent modules
ghc-options: -j4

if impl(ghc >= 9.7)
-- https://github.com/kcsongor/generic-lens/issues/158
allow-newer:
generic-lens:text,
generic-lens-core:text,
4 changes: 2 additions & 2 deletions lsp-types/lsp-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ library
UndecidableInstances

build-depends:
, aeson >=1.2.2.0 && <2.2
, aeson >=1.2.2.0 && <2.3
, base >=4.11 && <5
, binary
, containers
Expand All @@ -87,7 +87,7 @@ library
, mtl <2.4
, prettyprinter
, network-uri >=2.6
, row-types
, row-types >=1.0
, safe
, some
, template-haskell
Expand Down
4 changes: 4 additions & 0 deletions lsp-types/src/Language/LSP/Protocol/Types/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ instance Semigroup s => Semigroup (s |? Null) where
-- in both aeson-1 and aeson-2

-- | Include a value in an JSON object optionally, omitting it if it is 'Nothing'.
#if MIN_VERSION_aeson(2,2,0)
(.=?) :: (J.KeyValue e kv, J.ToJSON v) => String -> Maybe v -> [kv]
#else
(.=?) :: (J.KeyValue kv, J.ToJSON v) => String -> Maybe v -> [kv]
#endif
k .=? v = case v of
Just v' -> [fromString k J..= v']
Nothing -> mempty

0 comments on commit 78e3fd1

Please sign in to comment.