Skip to content

Commit a10dc72

Browse files
committed
Fix build for ghc < 8.10
1 parent 8d3e2f6 commit a10dc72

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
@@ -370,10 +370,10 @@ applyHint ide nfp mhint =
370370
-- because SrcSpan (1,20,??,??) doesn't contain position (1,13).
371371
#ifdef GHC_LIB
372372
let writeFileUTF8NoNewLineTranslation file txt =
373-
withFile file WriteMode $ \h -> do
374-
hSetEncoding h utf8
375-
hSetNewlineMode h noNewlineTranslation
376-
hPutStr h (T.unpack txt)
373+
withFile file WriteMode $ \h -> do
374+
hSetEncoding h utf8
375+
hSetNewlineMode h noNewlineTranslation
376+
hPutStr h (T.unpack txt)
377377
res <-
378378
liftIO $ withSystemTempFile (takeFileName fp) $ \temp h -> do
379379
hClose h

0 commit comments

Comments
 (0)