1
1
{-# OPTIONS_GHC -Wno-orphans #-}
2
- {-# LANGUAGE CPP #-}
3
2
module Development.IDE.Main
4
3
(Arguments (.. )
5
4
,Command (.. )
@@ -24,7 +23,8 @@ import Data.Maybe (catMaybes, isJust)
24
23
import qualified Data.Text as T
25
24
import qualified Data.Text.IO as T
26
25
import Development.IDE (Action , Rules ,
27
- hDuplicateTo' )
26
+ hDuplicateTo' ,
27
+ isOverGhc9 )
28
28
import Development.IDE.Core.Debouncer (Debouncer ,
29
29
newAsyncDebouncer )
30
30
import Development.IDE.Core.FileStore (isWatchSupported ,
@@ -77,9 +77,7 @@ import Ide.PluginUtils (allLspCmdIds',
77
77
pluginDescToIdePlugins )
78
78
import Ide.Types (IdePlugins )
79
79
import qualified Language.LSP.Server as LSP
80
- #if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,0,1,0)))
81
80
import qualified Language.LSP.Types as LSP
82
- #endif
83
81
import Options.Applicative hiding (action )
84
82
import qualified System.Directory.Extra as IO
85
83
import System.Exit (ExitCode (ExitFailure ),
@@ -233,14 +231,13 @@ defaultMain Arguments{..} = do
233
231
, optRunSubset = runSubset
234
232
}
235
233
caps = LSP. resClientCapabilities env
236
- -- FIXME: Remove this after GHC 9 gets fully supported
237
- #if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(9,0,1,0)))
238
- LSP. runLspT env $
234
+ -- FIXME: Remove this after GHC 9 gets fully supported
235
+ when isOverGhc9 $
236
+ LSP. runLspT env $
239
237
LSP. sendNotification LSP. SWindowShowMessage $
240
238
LSP. ShowMessageParams LSP. MtWarning $
241
239
" Currently, HLS supports GHC 9 only partially. "
242
240
<> " See [issue #297](https://github.com/haskell/haskell-language-server/issues/297) for more detail."
243
- #endif
244
241
initialise
245
242
argsDefaultHlsConfig
246
243
rules
0 commit comments