Skip to content

Commit 364eb95

Browse files
committed
rebase
1 parent 5d59b3b commit 364eb95

File tree

24 files changed

+144
-42
lines changed

24 files changed

+144
-42
lines changed

cabal.project

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ package *
5252

5353
write-ghc-environment-files: never
5454

55-
index-state: 2023-09-08T00:00:00Z
55+
index-state: 2023-10-05T00:00:00Z
5656

5757
constraints:
5858
-- For GHC 9.4, older versions of entropy fail to build on Windows
@@ -72,8 +72,6 @@ constraints:
7272
setup.happy == 1.20.1.1,
7373
happy == 1.20.1.1,
7474
filepath installed,
75-
-- for ghc 8.10, stm-hamt 1.2.0.10 doesn't build
76-
stm-hamt < 1.2.0.10,
7775
-- Centos 7 comes with an old gcc version that doesn't know about
7876
-- the flag '-fopen-simd', which blocked the release 2.2.0.0.
7977
-- We want to be able to benefit from the performance optimisations
@@ -103,3 +101,31 @@ if impl(ghc >= 9.5)
103101
-- ghc-9.6
104102
ekg-core:ghc-prim,
105103
stm-hamt:transformers,
104+
105+
if impl(ghc >= 9.7)
106+
allow-newer:
107+
-- ghc-9.8
108+
base,
109+
template-haskell,
110+
ghc,
111+
ghc-prim,
112+
integer-gmp,
113+
ghc-bignum,
114+
template-haskell,
115+
text,
116+
binary,
117+
bytestring,
118+
Cabal,
119+
unix,
120+
deepseq,
121+
122+
repository head.hackage.ghc.haskell.org
123+
url: https://ghc.gitlab.haskell.org/head.hackage/
124+
secure: True
125+
key-threshold: 3
126+
root-keys:
127+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
128+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
129+
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
130+
131+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org

ghcide/src/Development/IDE/GHC/Compat/Core.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,9 @@ import GHC.Parser.Lexer hiding (initParserState, getPsMess
560560
import GHC.Parser.Annotation (EpAnn (..))
561561
import GHC.Platform.Ways
562562
import GHC.Runtime.Context (InteractiveImport (..))
563+
#if !MIN_VERSION_ghc(9,7,0)
563564
import GHC.Types.Avail (greNamePrintableName)
565+
#endif
564566
import GHC.Types.Fixity (LexicalFixity (..), Fixity (..), defaultFixity)
565567
import GHC.Types.Meta
566568
import GHC.Types.Name.Set

haskell-language-server.cabal

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ common cabal
207207
cpp-options: -Dhls_cabal
208208

209209
common class
210-
if flag(class)
210+
if flag(class) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
211211
build-depends: hls-class-plugin == 2.2.0.0
212212
cpp-options: -Dhls_class
213213

@@ -217,7 +217,7 @@ common callHierarchy
217217
cpp-options: -Dhls_callHierarchy
218218

219219
common eval
220-
if flag(eval)
220+
if flag(eval) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
221221
build-depends: hls-eval-plugin == 2.2.0.0
222222
cpp-options: -Dhls_eval
223223

@@ -227,17 +227,17 @@ common importLens
227227
cpp-options: -Dhls_importLens
228228

229229
common rename
230-
if flag(rename)
230+
if flag(rename) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
231231
build-depends: hls-rename-plugin == 2.2.0.0
232232
cpp-options: -Dhls_rename
233233

234234
common retrie
235-
if flag(retrie)
235+
if flag(retrie) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
236236
build-depends: hls-retrie-plugin == 2.2.0.0
237237
cpp-options: -Dhls_retrie
238238

239239
common hlint
240-
if flag(hlint)
240+
if flag(hlint) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
241241
build-depends: hls-hlint-plugin == 2.2.0.0
242242
cpp-options: -Dhls_hlint
243243

@@ -252,7 +252,7 @@ common pragmas
252252
cpp-options: -Dhls_pragmas
253253

254254
common splice
255-
if flag(splice)
255+
if flag(splice) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
256256
build-depends: hls-splice-plugin == 2.2.0.0
257257
cpp-options: -Dhls_splice
258258

@@ -277,7 +277,7 @@ common changeTypeSignature
277277
cpp-options: -Dhls_changeTypeSignature
278278

279279
common gadt
280-
if flag(gadt)
280+
if flag(gadt) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
281281
build-depends: hls-gadt-plugin == 2.2.0.0
282282
cpp-options: -Dhls_gadt
283283

@@ -292,7 +292,7 @@ common explicitFields
292292
cpp-options: -DexplicitFields
293293

294294
common overloadedRecordDot
295-
if flag(overloadedRecordDot) && (impl(ghc >= 9.2.0) || flag(ignore-plugins-ghc-bounds))
295+
if flag(overloadedRecordDot)
296296
build-depends: hls-overloaded-record-dot-plugin == 2.2.0.0
297297
cpp-options: -Dhls_overloaded_record_dot
298298

@@ -304,7 +304,7 @@ common floskell
304304
cpp-options: -Dhls_floskell
305305

306306
common fourmolu
307-
if flag(fourmolu)
307+
if flag(fourmolu) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
308308
build-depends: hls-fourmolu-plugin == 2.2.0.0
309309
cpp-options: -Dhls_fourmolu
310310

@@ -314,12 +314,12 @@ common ormolu
314314
cpp-options: -Dhls_ormolu
315315

316316
common stylishHaskell
317-
if flag(stylishHaskell)
317+
if flag(stylishHaskell) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
318318
build-depends: hls-stylish-haskell-plugin == 2.2.0.0
319319
cpp-options: -Dhls_stylishHaskell
320320

321321
common refactor
322-
if flag(refactor)
322+
if flag(refactor) && (impl(ghc < 9.8.0) || flag(ignore-plugins-ghc-bounds))
323323
build-depends: hls-refactor-plugin == 2.2.0.0
324324
cpp-options: -Dhls_refactor
325325

hls-test-utils/src/Test/Hls.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE DataKinds #-}
22
{-# LANGUAGE DisambiguateRecordFields #-}
3+
{-# LANGUAGE DuplicateRecordFields #-}
34
{-# LANGUAGE GADTs #-}
45
{-# LANGUAGE LambdaCase #-}
56
{-# LANGUAGE NamedFieldPuns #-}

plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ source-repository head
2222
location: https://github.com/haskell/haskell-language-server.git
2323

2424
library
25-
buildable: True
2625
exposed-modules: Ide.Plugin.AlternateNumberFormat, Ide.Plugin.Conversion
2726
other-modules: Ide.Plugin.Literals
2827
hs-source-dirs: src
@@ -53,7 +52,6 @@ library
5352
RecordWildCards
5453

5554
test-suite tests
56-
buildable: True
5755
type: exitcode-stdio-1.0
5856
default-language: Haskell2010
5957
hs-source-dirs: test

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ module Ide.Plugin.Literals (
1414
import Data.Maybe (maybeToList)
1515
import Data.Text (Text)
1616
import qualified Data.Text as T
17+
#if __GLASGOW_HASKELL__ == 908
18+
import qualified Data.Text.Encoding as T
19+
#endif
1720
import Development.IDE.GHC.Compat hiding (getSrcSpan)
1821
import Development.IDE.Graph.Classes (NFData (rnf))
1922
import Generics.SYB (Data, Typeable, everything,
@@ -100,5 +103,9 @@ fromFractionalLit s fl@FL{fl_text} = fmap (\txt' -> FracLiteral (LiteralSrcSpan
100103

101104
fromSourceText :: SourceText -> Maybe Text
102105
fromSourceText = \case
106+
#if __GLASGOW_HASKELL__ == 908
107+
SourceText s -> Just $ T.decodeUtf8 $ bytesFS s
108+
#else
103109
SourceText s -> Just $ T.pack s
110+
#endif
104111
NoSourceText -> Nothing

plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ library
4646
default-extensions: DataKinds
4747

4848
test-suite tests
49-
buildable: True
5049
type: exitcode-stdio-1.0
5150
default-language: Haskell2010
5251
hs-source-dirs: test

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ source-repository head
2323
location: https://github.com/haskell/haskell-language-server.git
2424

2525
library
26-
buildable: True
2726
exposed-modules: Ide.Plugin.ChangeTypeSignature
2827
hs-source-dirs: src
2928
build-depends:
@@ -51,7 +50,6 @@ library
5150

5251

5352
test-suite tests
54-
buildable: True
5553
type: exitcode-stdio-1.0
5654
default-language: Haskell2010
5755
hs-source-dirs: test

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

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

2727
library
28+
if impl(ghc >= 9.8)
29+
buildable: False
30+
else
31+
buildable: True
2832
exposed-modules: Ide.Plugin.Class
2933
other-modules: Ide.Plugin.Class.CodeAction
3034
, Ide.Plugin.Class.CodeLens
@@ -63,6 +67,10 @@ library
6367
ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-name-shadowing
6468

6569
test-suite tests
70+
if impl(ghc >= 9.8)
71+
buildable: False
72+
else
73+
buildable: True
6674
type: exitcode-stdio-1.0
6775
default-language: Haskell2010
6876
hs-source-dirs: test

plugins/hls-eval-plugin/hls-eval-plugin.cabal

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ source-repository head
3737
location: https://github.com/haskell/haskell-language-server
3838

3939
library
40+
if impl(ghc >= 9.8)
41+
buildable: False
42+
else
43+
buildable: True
4044
exposed-modules:
4145
Ide.Plugin.Eval
4246
Ide.Plugin.Eval.Types
@@ -98,6 +102,10 @@ library
98102
TypeOperators
99103

100104
test-suite tests
105+
if impl(ghc >= 9.8)
106+
buildable: False
107+
else
108+
buildable: True
101109
type: exitcode-stdio-1.0
102110
default-language: Haskell2010
103111
hs-source-dirs: test

0 commit comments

Comments
 (0)