From 23a485f48ca7e12b2fbe4ee15555a2f9cd2ac54b Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 28 Jun 2020 20:13:51 +0100 Subject: [PATCH] hlints --- src/Development/IDE/Core/Rules.hs | 2 +- test/exe/Main.hs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Development/IDE/Core/Rules.hs b/src/Development/IDE/Core/Rules.hs index 1ed2fb6bb..c414662cb 100644 --- a/src/Development/IDE/Core/Rules.hs +++ b/src/Development/IDE/Core/Rules.hs @@ -651,7 +651,7 @@ isHiFileStableRule = define $ \IsHiFileStable f -> do then pure SourceModified else do (fileImports, _) <- use_ GetLocatedImports f - let imports = (fmap artifactFilePath) . snd <$> fileImports + let imports = fmap artifactFilePath . snd <$> fileImports deps <- uses_ IsHiFileStable (catMaybes imports) pure $ if all (== SourceUnmodifiedAndStable) deps then SourceUnmodifiedAndStable diff --git a/test/exe/Main.hs b/test/exe/Main.hs index ce8a2ad85..5b1538f68 100644 --- a/test/exe/Main.hs +++ b/test/exe/Main.hs @@ -51,7 +51,6 @@ import Test.Tasty.ExpectedFailure import Test.Tasty.Ingredients.Rerun import Test.Tasty.HUnit import Test.Tasty.QuickCheck -import qualified Data.Text.IO as T main :: IO () main = do @@ -2253,7 +2252,7 @@ ifaceTHTest = testCase "iface-th-test" $ withoutStackEnv $ runWithExtraFiles "TH cdoc <- createDoc cPath "haskell" cSource -- Change [TH]a from () to Bool - liftIO $ T.writeFile aPath (T.unlines $ init (T.lines aSource) ++ ["th_a = [d| a = False|]"]) + liftIO $ writeFileUTF8 aPath (unlines $ init (lines $ T.unpack aSource) ++ ["th_a = [d| a = False|]"]) -- Check that the change propogates to C changeDoc cdoc [TextDocumentContentChangeEvent Nothing Nothing cSource]