@@ -211,10 +211,10 @@ main = do
211211 ide <- initialise def mainRule (pure $ IdInt 0 ) (showEvent lock) (logger Info ) debouncer (defaultIdeOptions $ loadSession dir) vfs
212212
213213 putStrLn " \n Step 4/6: Type checking the files"
214- setFilesOfInterest ide $ HashSet. fromList $ map toNormalizedFilePath files
215- _ <- runActionSync ide $ uses TypeCheck (map toNormalizedFilePath files)
216- -- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath "src/Development/IDE/Core/Rules.hs"
217- -- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath "exe/Main.hs"
214+ setFilesOfInterest ide $ HashSet. fromList $ map toNormalizedFilePath' files
215+ _ <- runActionSync ide $ uses TypeCheck (map toNormalizedFilePath' files)
216+ -- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath' "src/Development/IDE/Core/Rules.hs"
217+ -- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath' "exe/Main.hs"
218218 return ()
219219
220220expandFiles :: [FilePath ] -> IO [FilePath ]
@@ -238,7 +238,7 @@ kick = do
238238-- | Print an LSP event.
239239showEvent :: Lock -> FromServerMessage -> IO ()
240240showEvent _ (EventFileDiagnostics _ [] ) = return ()
241- showEvent lock (EventFileDiagnostics (toNormalizedFilePath -> file) diags) =
241+ showEvent lock (EventFileDiagnostics (toNormalizedFilePath' -> file) diags) =
242242 withLock lock $ T. putStrLn $ showDiagnosticsColored $ map (file,ShowDiag ,) diags
243243showEvent lock e = withLock lock $ print e
244244
@@ -271,10 +271,10 @@ targetToFile :: [FilePath] -> TargetId -> IO [NormalizedFilePath]
271271targetToFile is (TargetModule mod ) = do
272272 let fps = [i </> (moduleNameSlashes mod ) -<.> ext | ext <- exts, i <- is ]
273273 exts = [" hs" , " hs-boot" , " lhs" ]
274- mapM (fmap (toNormalizedFilePath) . canonicalizePath) fps
274+ mapM (fmap (toNormalizedFilePath' ) . canonicalizePath) fps
275275targetToFile _ (TargetFile f _) = do
276276 f' <- canonicalizePath f
277- return [(toNormalizedFilePath f')]
277+ return [(toNormalizedFilePath' f')]
278278
279279setNameCache :: IORef NameCache -> HscEnv -> HscEnv
280280setNameCache nc hsc = hsc { hsc_NC = nc }
@@ -395,7 +395,7 @@ loadSession dir = liftIO $ do
395395 let v = fromMaybe HM. empty mv
396396 cfp <- liftIO $ canonicalizePath file
397397 -- We sort so exact matches come first.
398- case HM. lookup (toNormalizedFilePath cfp) v of
398+ case HM. lookup (toNormalizedFilePath' cfp) v of
399399 Just opts -> do
400400 -- putStrLn $ "Cached component of " <> show file
401401 pure opts
0 commit comments