Skip to content

Commit 25d1583

Browse files
committed
Fix build for ghc < 8.10
1 parent bcb89da commit 25d1583

File tree

1 file changed

+5
-5
lines changed
  • plugins/hls-hlint-plugin/src/Ide/Plugin

1 file changed

+5
-5
lines changed

plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import Development.IDE.Core.Shake (getDiagnostics)
4040
#ifdef GHC_LIB
4141
import Data.List (nub)
4242
import "ghc-lib" GHC hiding (DynFlags(..))
43-
import "ghc-lib" GHC.LanguageExtension (Extension)
43+
import "ghc-lib-parser" GHC.LanguageExtensions (Extension)
4444
import "ghc" GHC as RealGHC (DynFlags(..))
4545
import "ghc" HscTypes as RealGHC.HscTypes (hsc_dflags)
4646
import qualified "ghc" EnumSet as EnumSet
@@ -369,10 +369,10 @@ applyHint ide nfp mhint =
369369
-- because SrcSpan (1,20,??,??) doesn't contain position (1,13).
370370
#ifdef GHC_LIB
371371
let writeFileUTF8NoNewLineTranslation file txt =
372-
withFile file WriteMode $ \h -> do
373-
hSetEncoding h utf8
374-
hSetNewlineMode h noNewlineTranslation
375-
hPutStr h (T.unpack txt)
372+
withFile file WriteMode $ \h -> do
373+
hSetEncoding h utf8
374+
hSetNewlineMode h noNewlineTranslation
375+
hPutStr h (T.unpack txt)
376376
res <-
377377
liftIO $ withSystemTempFile (takeFileName fp) $ \temp h -> do
378378
hClose h

0 commit comments

Comments
 (0)