Skip to content

Commit 12377dd

Browse files
committed
Use ghcVersion check
1 parent c62e42f commit 12377dd

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

ghcide/src/Development/IDE/GHC/Util.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
module Development.IDE.GHC.Util(
77
modifyDynFlags,
88
evalGhcEnv,
9-
isOverGhc9,
109
-- * GHC wrappers
1110
prettyPrint,
1211
unsafePrintSDoc,
@@ -281,10 +280,3 @@ ioe_dupHandlesNotCompatible :: Handle -> IO a
281280
ioe_dupHandlesNotCompatible h =
282281
ioException (IOError (Just h) IllegalOperation "hDuplicateTo"
283282
"handles are incompatible" Nothing Nothing)
284-
285-
isOverGhc9 :: Bool
286-
#if MIN_VERSION_ghc(9,0,1)
287-
isOverGhc9 = True
288-
#else
289-
isOverGhc9 = False
290-
#endif

ghcide/src/Development/IDE/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import Data.Text.Lazy.Encoding (decodeUtf8)
2727
import qualified Data.Text.Lazy.IO as LT
2828
import Development.IDE (Action, Rules,
2929
hDuplicateTo',
30-
isOverGhc9)
30+
GhcVersion(..),
31+
ghcVersion)
3132
import Development.IDE.Core.Debouncer (Debouncer,
3233
newAsyncDebouncer)
3334
import Development.IDE.Core.FileStore (isWatchSupported,
@@ -259,7 +260,7 @@ defaultMain Arguments{..} = do
259260
}
260261
caps = LSP.resClientCapabilities env
261262
-- FIXME: Remove this after GHC 9 gets fully supported
262-
when isOverGhc9 $
263+
when (ghcVersion == GHC90) $
263264
LSP.runLspT env $
264265
LSP.sendNotification LSP.SWindowShowMessage $
265266
LSP.ShowMessageParams LSP.MtWarning $

0 commit comments

Comments
 (0)