Skip to content

Commit 36e0304

Browse files
drsoochwz1000
authored andcommitted
Change Type Signature Plugin buildable with 9.4
1 parent 26a6ca6 commit 36e0304

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ jobs:
252252
name: Test hls-code-range-plugin test suite
253253
run: cabal test hls-code-range-plugin --test-options="$TEST_OPTS" || cabal test hls-code-range-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-code-range-plugin --test-options="$TEST_OPTS"
254254

255-
- if: matrix.test && matrix.ghc != '9.4.2'
255+
- if: matrix.test
256256
name: Test hls-change-type-signature test suite
257257
run: cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS"
258258

haskell-language-server.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ common codeRange
324324
cpp-options: -Dhls_codeRange
325325

326326
common changeTypeSignature
327-
if flag(changeTypeSignature) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
327+
if flag(changeTypeSignature)
328328
build-depends: hls-change-type-signature-plugin ^>= 1.0
329329
cpp-options: -Dhls_changeTypeSignature
330330

plugins/hls-change-type-signature-plugin/hls-change-type-signature-plugin.cabal

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.4
22
name: hls-change-type-signature-plugin
3-
version: 1.0.1.0
3+
version: 1.0.1.1
44
synopsis: Change a declarations type signature with a Code Action
55
description:
66
Please see the README on GitHub at <https://github.com/haskell/plugins/hls-change-type-signature-plugin/README.md>
@@ -19,10 +19,7 @@ extra-source-files:
1919
test/testdata/*.yaml
2020

2121
library
22-
if impl(ghc >= 9.3)
23-
buildable: False
24-
else
25-
buildable: True
22+
buildable: True
2623
exposed-modules: Ide.Plugin.ChangeTypeSignature
2724
hs-source-dirs: src
2825
build-depends:
@@ -50,10 +47,7 @@ library
5047

5148

5249
test-suite tests
53-
if impl(ghc >= 9.3)
54-
buildable: False
55-
else
56-
buildable: True
50+
buildable: True
5751
type: exitcode-stdio-1.0
5852
default-language: Haskell2010
5953
hs-source-dirs: test

plugins/hls-change-type-signature-plugin/test/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Ide.Plugin.ChangeTypeSignature (errorMessageRegexes)
99
import qualified Ide.Plugin.ChangeTypeSignature as ChangeTypeSignature
1010
import System.FilePath ((<.>), (</>))
1111
import Test.Hls (CodeAction (..), Command,
12-
GhcVersion (GHC92), IdeState,
12+
GhcVersion (..), IdeState,
1313
PluginDescriptor,
1414
Position (Position),
1515
Range (Range), Session,
@@ -38,7 +38,8 @@ test :: TestTree
3838
test = testGroup "changeTypeSignature" [
3939
testRegexes
4040
, codeActionTest "TExpectedActual" 4 11
41-
, knownBrokenForGhcVersions [GHC92] "Error Message in 9.2 does not provide enough info" $ codeActionTest "TRigidType" 4 14
41+
, knownBrokenForGhcVersions [GHC92, GHC94] "Error Message in 9.2/9.4 does not provide enough info" $ codeActionTest "TRigidType" 4 14
42+
, codeActionTest "TRigidType2" 4 6
4243
, codeActionTest "TLocalBinding" 7 22
4344
, codeActionTest "TLocalBindingShadow1" 11 8
4445
, codeActionTest "TLocalBindingShadow2" 7 22
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module TRigidType2 where
2+
3+
test :: [Int] -> Int
4+
test = head
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module TRigidType2 where
2+
3+
test :: a -> Int
4+
test = head

0 commit comments

Comments
 (0)