Skip to content

Commit 566e0d0

Browse files
committed
Support ghc 9.4 for hls-class-plugin
1 parent 8fd2b89 commit 566e0d0

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
name: Test hls-floskell-plugin
177177
run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
178178

179-
- if: matrix.test && matrix.ghc != '9.4.2'
179+
- if: matrix.test
180180
name: Test hls-class-plugin
181181
run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"
182182

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ package *
4848

4949
write-ghc-environment-files: never
5050

51-
index-state: 2022-09-14T16:53:13Z
51+
index-state: 2022-10-07T12:19:15Z
5252

5353
constraints:
5454
-- For GHC 9.4, older versions of entropy fail to build on Windows

haskell-language-server.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ flag dynamic
201201
manual: True
202202

203203
common class
204-
if flag(class) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
204+
if flag(class)
205205
build-depends: hls-class-plugin ^>= 1.1
206206
cpp-options: -Dhls_class
207207

@@ -271,7 +271,7 @@ common splice
271271
cpp-options: -Dhls_splice
272272

273273
common alternateNumberFormat
274-
if flag(alternateNumberFormat)
274+
if flag(alternateNumberFormat)
275275
build-depends: hls-alternate-number-format-plugin ^>= 1.2
276276
cpp-options: -Dhls_alternateNumberFormat
277277

plugins/hls-class-plugin/hls-class-plugin.cabal

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ source-repository head
2525
location: https://github.com/haskell/haskell-language-server.git
2626

2727
library
28-
if impl(ghc >= 9.3)
29-
buildable: False
30-
else
31-
buildable: True
3228
exposed-modules: Ide.Plugin.Class
3329
other-modules: Ide.Plugin.Class.CodeAction
3430
, Ide.Plugin.Class.CodeLens
@@ -53,9 +49,9 @@ library
5349
, transformers
5450

5551
if impl(ghc >=9.2.1)
56-
build-depends: ghc-exactprint ^>= 1.5
52+
build-depends: ghc-exactprint >= 1.5
5753
else
58-
build-depends: ghc-exactprint >= 0.6.4 && <1.1
54+
build-depends: ghc-exactprint >= 0.6.4 && <1.1
5955

6056
default-language: Haskell2010
6157
default-extensions:
@@ -66,10 +62,6 @@ library
6662
ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-name-shadowing
6763

6864
test-suite tests
69-
if impl(ghc >= 9.3)
70-
buildable: False
71-
else
72-
buildable: True
7365
type: exitcode-stdio-1.0
7466
default-language: Haskell2010
7567
hs-source-dirs: test

plugins/hls-class-plugin/test/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ codeActionTests recorder = testGroup
6969
executeCodeAction gAction
7070
, goldenWithClass recorder "Creates a placeholder for other two methods" "T6" "2" $ \(_:_:ghAction:_) -> do
7171
executeCodeAction ghAction
72-
, onlyRunForGhcVersions [GHC92] "Only ghc-9.2 enabled GHC2021 implicitly" $
72+
, onlyRunForGhcVersions [GHC92, GHC94] "Only ghc-9.2 enabled GHC2021 implicitly" $
7373
goldenWithClass recorder "Don't insert pragma with GHC2021" "InsertWithGHC2021Enabled" "" $ \(_:eqWithSig:_) -> do
7474
executeCodeAction eqWithSig
7575
, goldenWithClass recorder "Insert pragma if not exist" "InsertWithoutPragma" "" $ \(_:eqWithSig:_) -> do
@@ -96,7 +96,7 @@ codeLensTests recorder = testGroup
9696
, goldenCodeLens recorder "Apply code lens for local class" "LocalClassDefine" 0
9797
, goldenCodeLens recorder "Apply code lens on the same line" "Inline" 0
9898
, goldenCodeLens recorder "Don't insert pragma while existing" "CodeLensWithPragma" 0
99-
, onlyRunForGhcVersions [GHC92] "Only ghc-9.2 enabled GHC2021 implicitly" $
99+
, onlyRunForGhcVersions [GHC92, GHC94] "Only ghc-9.2 enabled GHC2021 implicitly" $
100100
goldenCodeLens recorder "Don't insert pragma while GHC2021 enabled" "CodeLensWithGHC2021" 0
101101
, goldenCodeLens recorder "Qualified name" "Qualified" 0
102102
, goldenCodeLens recorder "Type family" "TypeFamily" 0

0 commit comments

Comments
 (0)