From 5425a0966680b21ff19d49e9d0bf47fcf6e10cbb Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Tue, 12 Jan 2016 22:09:33 +0300 Subject: [PATCH] [#722] Get encoding from hlint options --- Language/Haskell/GhcMod/Lint.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Language/Haskell/GhcMod/Lint.hs b/Language/Haskell/GhcMod/Lint.hs index f217772..f6c549f 100644 --- a/Language/Haskell/GhcMod/Lint.hs +++ b/Language/Haskell/GhcMod/Lint.hs @@ -22,7 +22,7 @@ lint opt file = ghandle handler $ withMappedFile file $ \tempfile -> do (flags, classify, hint) <- liftIO $ argsSettings $ optLintHlintOpts opt hSrc <- liftIO $ openFile tempfile ReadMode - liftIO $ hSetEncoding hSrc utf8 + liftIO $ hSetEncoding hSrc (encoding flags) res <- liftIO $ parseModuleEx flags file =<< Just `fmap` hGetContents hSrc case res of Right m -> pack . map show $ applyHints classify hint [m]