Skip to content

Commit 608cfd9

Browse files
drsoochwz1000
authored andcommitted
Alternate Number Format Plugin buildable with GHC 9.4
1 parent 5b229b6 commit 608cfd9

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ jobs:
240240
name: Test hls-module-name-plugin test suite
241241
run: cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-module-name-plugin --test-options="$TEST_OPTS"
242242

243-
- if: matrix.test && matrix.ghc != '9.4.2'
243+
- if: matrix.test
244244
name: Test hls-alternate-number-format-plugin test suite
245245
run: cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS"
246246

haskell-language-server.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ common splice
309309
cpp-options: -Dhls_splice
310310

311311
common alternateNumberFormat
312-
if flag(alternateNumberFormat) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
312+
if flag(alternateNumberFormat)
313313
build-depends: hls-alternate-number-format-plugin ^>= 1.1
314314
cpp-options: -Dhls_alternateNumberFormat
315315

plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-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-alternate-number-format-plugin
3-
version: 1.1.0.0
3+
version: 1.1.0.1
44
synopsis: Provide Alternate Number Formats plugin for Haskell Language Server
55
description:
66
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -18,10 +18,7 @@ extra-source-files:
1818
test/testdata/*.yaml
1919

2020
library
21-
if impl(ghc >= 9.3)
22-
buildable: False
23-
else
24-
buildable: True
21+
buildable: True
2522
exposed-modules: Ide.Plugin.AlternateNumberFormat, Ide.Plugin.Conversion
2623
other-modules: Ide.Plugin.Literals
2724
hs-source-dirs: src
@@ -51,10 +48,7 @@ library
5148
RecordWildCards
5249

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

plugins/hls-alternate-number-format-plugin/src/Ide/Plugin/Literals.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ getPattern (L (locA -> (RealSrcSpan patSpan _)) pat) = case pat of
7878
HsInt _ val -> fromIntegralLit patSpan val
7979
HsRat _ val _ -> fromFractionalLit patSpan val
8080
_ -> Nothing
81-
-- a located HsOverLit is (GenLocated SrcSpan HsOverLit) NOT (GenLocated SrcSpanAnn' a HsOverLit)
82-
NPat _ (L (RealSrcSpan sSpan _) overLit) _ _ -> fromOverLit overLit sSpan
83-
NPlusKPat _ _ (L (RealSrcSpan sSpan _) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
81+
NPat _ (L (locA -> (RealSrcSpan sSpan _)) overLit) _ _ -> fromOverLit overLit sSpan
82+
NPlusKPat _ _ (L (locA -> (RealSrcSpan sSpan _)) overLit1) _ _ _ -> fromOverLit overLit1 sSpan
8483
_ -> Nothing
8584
getPattern _ = Nothing
8685

0 commit comments

Comments
 (0)