Skip to content

Commit f7b030d

Browse files
authored
Merge pull request #312 from anka-213/ghc-9.0.1
Add support for ghc 9.0.1
2 parents 13d1b6d + e96383a commit f7b030d

File tree

9 files changed

+37
-19
lines changed

9 files changed

+37
-19
lines changed

.github/workflows/haskell.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ghc: ['8.10.4', '8.8.3', '8.6.5', '8.4.4']
12+
ghc: ['9.0.1', '8.10.4', '8.8.3', '8.6.5', '8.4.4']
1313
os: [ubuntu-latest, macOS-latest, windows-latest]
1414
exclude:
1515
- os: windows-latest
@@ -20,7 +20,7 @@ jobs:
2020
- uses: haskell/actions/setup@v1
2121
with:
2222
ghc-version: ${{ matrix.ghc }}
23-
cabal-version: '3.2'
23+
cabal-version: '3.4'
2424

2525
- name: Cache
2626
uses: actions/cache@v1
@@ -34,6 +34,8 @@ jobs:
3434
${{ runner.os }}-build-
3535
${{ runner.os }}-
3636
37+
- name: Cabal update
38+
run: cabal update
3739
- name: Build
3840
run: cabal build all
3941
- name: Test

cabal.project

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,23 @@ benchmarks: True
1111
test-show-details: direct
1212
haddock-quickjump: True
1313

14-
constraints: some == 1.0.1,
15-
dependent-sum == 0.7.1.0
14+
allow-newer:
15+
lens:template-haskell,
16+
cryptohash-sha1:base,
17+
cryptohash-md5:base,
18+
hslogger:base,
19+
entropy:Cabal,
1620

17-
max-backjumps: 10000
21+
-- Required for ghc-9.0.1 support
22+
source-repository-package
23+
type: git
24+
location: https://github.com/anka-213/th-extras
25+
tag: 57a97b4df128eb7b360e8ab9c5759392de8d1659
26+
-- https://github.com/mokus0/th-extras/pull/8
27+
28+
source-repository-package
29+
type: git
30+
location: https://github.com/anka-213/dependent-sum
31+
tag: 8cf4c7fbc3bfa2be475a17bb7c94a1e1e9a830b5
32+
subdir: dependent-sum-template
33+
-- https://github.com/obsidiansystems/dependent-sum/pull/57

lsp-test/func-test/func-test.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-type: Simple
66
test-suite func-test
77
main-is: FuncTest.hs
88
type: exitcode-stdio-1.0
9-
build-depends: base <4.15
9+
build-depends: base <4.16
1010
, lsp-test
1111
, lsp
1212
, data-default

lsp-test/lsp-test.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description:
55
A test framework for writing tests against
66
<https://microsoft.github.io/language-server-protocol/ Language Server Protocol servers>.
77
@Language.LSP.Test@ launches your server as a subprocess and allows you to simulate a session
8-
down to the wire.
8+
down to the wire.
99
To see examples of it in action, check out <https://github.com/haskell/haskell-ide-engine haskell-ide-engine>,
1010
<https://github.com/haskell/haskell-language-server haskell-language-server> and
1111
<https://github.com/digital-asset/ghcide ghcide>.
@@ -98,7 +98,7 @@ test-suite func-test
9898
main-is: FuncTest.hs
9999
hs-source-dirs: func-test
100100
type: exitcode-stdio-1.0
101-
build-depends: base <4.15
101+
build-depends: base <4.16
102102
, lsp-test
103103
, lsp
104104
, data-default
@@ -109,7 +109,7 @@ test-suite func-test
109109
, async
110110
default-language: Haskell2010
111111

112-
test-suite example
112+
test-suite example
113113
main-is: Test.hs
114114
hs-source-dirs: example
115115
type: exitcode-stdio-1.0
@@ -123,7 +123,7 @@ benchmark simple-bench
123123
main-is: SimpleBench.hs
124124
hs-source-dirs: bench
125125
type: exitcode-stdio-1.0
126-
build-depends: base <4.15
126+
build-depends: base <4.16
127127
, lsp-test
128128
, lsp
129129
, process

lsp-types/lsp-types.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ library
6969
, Language.LSP.Types.WorkspaceSymbol
7070
-- other-extensions:
7171
ghc-options: -Wall
72-
build-depends: base >= 4.11 && < 4.15
72+
build-depends: base >= 4.11 && < 4.16
7373
, aeson >=1.2.2.0
7474
, binary
7575
, bytestring

lsp-types/src/Language/LSP/Types/Method.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ instance A.FromJSON SomeServerMethod where
312312
parseJSON _ = fail "SomeServerMethod"
313313

314314
-- instance FromJSON (SMethod m)
315-
makeSingletonFromJSON 'SomeMethod ''SMethod
316315

317316
-- ---------------------------------------------------------------------
318317
-- TO JSON
@@ -396,3 +395,5 @@ instance A.ToJSON (SMethod m) where
396395
toJSON SCancelRequest = A.String "$/cancelRequest"
397396
-- Custom
398397
toJSON (SCustomMethod m) = A.String m
398+
399+
makeSingletonFromJSON 'SomeMethod ''SMethod

lsp-types/src/Language/LSP/Types/TextDocument.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ data SaveOptions =
8484
{ -- | The client is supposed to include the content on save.
8585
_includeText :: Maybe Bool
8686
} deriving (Show, Read, Eq)
87+
deriveJSON lspOptions ''SaveOptions
8788

8889
-- -------------------------------------
8990

@@ -107,7 +108,7 @@ instance FromJSON TextDocumentSyncKind where
107108
parseJSON (Number 1) = pure TdSyncFull
108109
parseJSON (Number 2) = pure TdSyncIncremental
109110
parseJSON _ = fail "TextDocumentSyncKind"
110-
111+
111112
data TextDocumentSyncOptions =
112113
TextDocumentSyncOptions
113114
{ -- | Open and close notifications are sent to the server. If omitted open
@@ -234,7 +235,6 @@ deriveJSON lspOptions ''WillSaveTextDocumentParams
234235

235236
-- -------------------------------------
236237

237-
deriveJSON lspOptions ''SaveOptions
238238

239239
makeExtendingDatatype "TextDocumentSaveRegistrationOptions"
240240
[''TextDocumentRegistrationOptions]

lsp-types/src/Language/LSP/Types/WatchedFiles.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{-# LANGUAGE DuplicateRecordFields #-}
33

44
module Language.LSP.Types.WatchedFiles where
5-
5+
66
import Data.Aeson
77
import Data.Aeson.TH
88
import Data.Bits
@@ -71,9 +71,8 @@ instance FromJSON WatchKind where
7171
| otherwise = fail "WatchKind"
7272
parseJSON _ = fail "WatchKind"
7373

74-
deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions
7574
deriveJSON lspOptions ''FileSystemWatcher
76-
75+
deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions
7776
-- | The file event type.
7877
data FileChangeType = FcCreated -- ^ The file got created.
7978
| FcChanged -- ^ The file got changed.

lsp/lsp.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ library
3131
, Language.LSP.Server.Control
3232
, Language.LSP.Server.Processing
3333
ghc-options: -Wall
34-
build-depends: base >= 4.11 && < 4.15
34+
build-depends: base >= 4.11 && < 4.16
3535
, async
3636
, aeson >=1.0.0.0
3737
, attoparsec
@@ -69,7 +69,7 @@ executable lsp-demo-reactor-server
6969
default-language: Haskell2010
7070
ghc-options: -Wall -Wno-unticked-promoted-constructors
7171

72-
build-depends: base >= 4.11 && < 4.15
72+
build-depends: base >= 4.11 && < 4.16
7373
, aeson
7474
, bytestring
7575
, containers

0 commit comments

Comments
 (0)