Apply 3 suggestion(s) to 1 file(s)

This commit is contained in:
Julian Ospald 2021-09-12 03:09:36 +00:00 committed by Chris Smith
parent eddda55fe6
commit bc64d2ade0

View File

@ -870,7 +870,7 @@ setGHC ver sghc = do
case sghc of case sghc of
SetGHCOnly -> lift warnAboutHlsCompatibility SetGHCOnly -> lift warnAboutHlsCompatibility
_ -> return () when (sghc == SetGHCOnly) $ lift warnAboutHlsCompatibility
pure ver pure ver
@ -1016,8 +1016,8 @@ setStack ver = do
pure () pure ()
-- | Warn if there's an installed HLS that's not compatible with the installed -- | Warn if the installed and set HLS is not compatible
-- GHC version. -- with the installed and set GHC version.
warnAboutHlsCompatibility :: ( MonadReader env m warnAboutHlsCompatibility :: ( MonadReader env m
, HasDirs env , HasDirs env
, HasLog env , HasLog env
@ -1031,7 +1031,8 @@ warnAboutHlsCompatibility = do
currentGHC <- fmap _tvVersion <$> ghcSet Nothing currentGHC <- fmap _tvVersion <$> ghcSet Nothing
case currentGHC of case currentGHC of
Just v | not (null supportedGHC) && v `notElem` supportedGHC -> do Just v | not (null supportedGHC)
, v `notElem` supportedGHC -> do
logWarn $ "The current GHC version is not compatible with the " logWarn $ "The current GHC version is not compatible with the "
<> "current version of Haskell Language Server." <> "current version of Haskell Language Server."
logWarn $ "Haskell IDE support may not work correctly until this is " logWarn $ "Haskell IDE support may not work correctly until this is "