File tree Expand file tree Collapse file tree 14 files changed +180
-245
lines changed
ghcide/src/Development/IDE Expand file tree Collapse file tree 14 files changed +180
-245
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ jobs:
148
148
name : Test hls-pragmas-plugin
149
149
run : cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS"
150
150
151
- - if : matrix.test && matrix.ghc != '9.4.4'
151
+ - if : matrix.test
152
152
name : Test hls-eval-plugin
153
153
run : cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"
154
154
Original file line number Diff line number Diff line change 208
208
- name : " GHC.Arr.!"
209
209
within : []
210
210
211
+ # We do not want to use functions from the
212
+ # GHC driver. Instead use hls rules to construct
213
+ # an appropriate GHC session
214
+ - name : " load"
215
+ within : []
216
+ - name : " load'"
217
+ within : []
218
+ - name : " loadWithCache"
219
+ within : []
220
+
211
221
# Tracing functions
212
222
# We ban an explicit list rather than the
213
223
# Debug.Trace, because that module also
Original file line number Diff line number Diff line change @@ -1008,28 +1008,6 @@ handleGenerationErrors' dflags source action =
1008
1008
. ((" Error during " ++ T. unpack source) ++ ) . show @ SomeException
1009
1009
]
1010
1010
1011
- -- | Load modules, quickly. Input doesn't need to be desugared.
1012
- -- A module must be loaded before dependent modules can be typechecked.
1013
- -- This variant of loadModuleHome will *never* cause recompilation, it just
1014
- -- modifies the session.
1015
- -- The order modules are loaded is important when there are hs-boot files.
1016
- -- In particular you should make sure to load the .hs version of a file after the
1017
- -- .hs-boot version.
1018
- loadModulesHome
1019
- :: [HomeModInfo ]
1020
- -> HscEnv
1021
- -> HscEnv
1022
- loadModulesHome mod_infos e =
1023
- #if MIN_VERSION_ghc(9,3,0)
1024
- hscUpdateHUG (\ hug -> foldl' (flip addHomeModInfoToHug) hug mod_infos) (e { hsc_type_env_vars = emptyKnotVars })
1025
- #else
1026
- let ! new_modules = addListToHpt (hsc_HPT e) [(mod_name x, x) | x <- mod_infos]
1027
- in e { hsc_HPT = new_modules
1028
- , hsc_type_env_var = Nothing
1029
- }
1030
- where
1031
- mod_name = moduleName . mi_module . hm_iface
1032
- #endif
1033
1011
1034
1012
-- Merge the HPTs, module graphs and FinderCaches
1035
1013
-- See Note [GhcSessionDeps] in Development.IDE.Core.Rules
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ module Development.IDE.Core.Rules(
57
57
typeCheckRuleDefinition ,
58
58
getRebuildCount ,
59
59
getSourceFileSource ,
60
+ currentLinkables ,
60
61
GhcSessionDepsConfig (.. ),
61
62
Log (.. ),
62
63
DisplayTHWarning (.. ),
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ module Development.IDE.GHC.Compat(
104
104
icInteractiveModule ,
105
105
HomePackageTable ,
106
106
lookupHpt ,
107
+ loadModulesHome ,
107
108
#if MIN_VERSION_ghc(9,3,0)
108
109
Dependencies (dep_direct_mods ),
109
110
#else
@@ -653,3 +654,26 @@ combineRealSrcSpans span1 span2
653
654
(srcSpanEndLine span2, srcSpanEndCol span2)
654
655
file = srcSpanFile span1
655
656
#endif
657
+
658
+ -- | Load modules, quickly. Input doesn't need to be desugared.
659
+ -- A module must be loaded before dependent modules can be typechecked.
660
+ -- This variant of loadModuleHome will *never* cause recompilation, it just
661
+ -- modifies the session.
662
+ -- The order modules are loaded is important when there are hs-boot files.
663
+ -- In particular you should make sure to load the .hs version of a file after the
664
+ -- .hs-boot version.
665
+ loadModulesHome
666
+ :: [HomeModInfo ]
667
+ -> HscEnv
668
+ -> HscEnv
669
+ loadModulesHome mod_infos e =
670
+ #if MIN_VERSION_ghc(9,3,0)
671
+ hscUpdateHUG (\ hug -> foldl' (flip addHomeModInfoToHug) hug mod_infos) (e { hsc_type_env_vars = emptyKnotVars })
672
+ #else
673
+ let ! new_modules = addListToHpt (hsc_HPT e) [(mod_name x, x) | x <- mod_infos]
674
+ in e { hsc_HPT = new_modules
675
+ , hsc_type_env_var = Nothing
676
+ }
677
+ where
678
+ mod_name = moduleName . mi_module . hm_iface
679
+ #endif
Original file line number Diff line number Diff line change @@ -874,7 +874,7 @@ pattern ExposePackage s a mr = DynFlags.ExposePackage s a mr
874
874
pattern FunTy :: Type -> Type -> Type
875
875
pattern FunTy arg res <- TyCoRep. FunTy {ft_arg = arg, ft_res = res}
876
876
877
- #if MIN_VERSION_ghc(9,0 ,0)
877
+ #if MIN_VERSION_ghc(8,10 ,0)
878
878
-- type HasSrcSpan x a = (GenLocated SrcSpan a ~ x)
879
879
-- type HasSrcSpan x = () :: Constraint
880
880
Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ module Development.IDE.GHC.Compat.Outputable (
20
20
#if MIN_VERSION_ghc(9,3,0)
21
21
DiagnosticReason (.. ),
22
22
renderDiagnosticMessageWithHints ,
23
+ pprMsgEnvelopeBagWithLoc ,
24
+ Error. getMessages ,
25
+ renderWithContext ,
26
+ defaultSDocContext ,
27
+ errMsgDiagnostic ,
28
+ unDecorated ,
29
+ diagnosticMessage ,
23
30
#else
24
31
pprWarning ,
25
32
pprError ,
@@ -29,6 +36,7 @@ module Development.IDE.GHC.Compat.Outputable (
29
36
MsgEnvelope ,
30
37
ErrMsg ,
31
38
WarnMsg ,
39
+ SourceError (.. ),
32
40
errMsgSpan ,
33
41
errMsgSeverity ,
34
42
formatErrorWithQual ,
Original file line number Diff line number Diff line change @@ -24,9 +24,7 @@ module Development.IDE.GHC.Compat.Util (
24
24
LBooleanFormula ,
25
25
BooleanFormula (.. ),
26
26
-- * OverridingBool
27
- #if !MIN_VERSION_ghc(9,3,0)
28
27
OverridingBool (.. ),
29
- #endif
30
28
-- * Maybes
31
29
MaybeErr (.. ),
32
30
orElse ,
@@ -104,6 +102,11 @@ import Unique
104
102
import Util
105
103
#endif
106
104
105
+ #if MIN_VERSION_ghc(9,3,0)
106
+ import GHC.Data.Bool
107
+ #endif
108
+
109
+
107
110
#if !MIN_VERSION_ghc(9,0,0)
108
111
type MonadCatch = Exception. ExceptionMonad
109
112
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ common haddockComments
237
237
cpp-options : -Dhls_haddockComments
238
238
239
239
common eval
240
- if flag(eval) && (impl(ghc < 9.4.1 ) || flag(ignore-plugins-ghc-bounds))
240
+ if flag(eval)
241
241
build-depends : hls-eval-plugin ^>= 1.4
242
242
cpp-options : -Dhls_eval
243
243
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ source-repository head
37
37
location : https://github.com/haskell/haskell-language-server
38
38
39
39
library
40
- if impl(ghc >= 9.3 )
41
- buildable : False
42
- else
43
- buildable : True
44
40
exposed-modules :
45
41
Ide.Plugin.Eval
46
42
Ide.Plugin.Eval.Types
@@ -101,10 +97,6 @@ library
101
97
TypeOperators
102
98
103
99
test-suite tests
104
- if impl(ghc >= 9.3 )
105
- buildable : False
106
- else
107
- buildable : True
108
100
type : exitcode-stdio-1.0
109
101
default-language : Haskell2010
110
102
hs-source-dirs : test
You can’t perform that action at this time.
0 commit comments