Skip to content

Commit 7a08b03

Browse files
committed
cleanup
1 parent c9219f0 commit 7a08b03

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,13 @@ loadSessionWithOptions recorder SessionLoadingOptions{..} dir = do
509509
TargetModule _ -> do
510510
found <- filterM (IO.doesFileExist . fromNormalizedFilePath) targetLocations
511511
return [(targetTarget, Set.fromList found)]
512-
hasUpdate <- join $ atomically $ do
512+
hasUpdate <- atomically $ do
513513
known <- readTVar knownTargetsVar
514514
let known' = flip mapHashed known $ \k ->
515515
HM.unionWith (<>) k $ HM.fromList knownTargets
516516
hasUpdate = if known /= known' then Just (unhashed known') else Nothing
517517
writeTVar knownTargetsVar known'
518-
return (pure hasUpdate)
518+
pure hasUpdate
519519
for_ hasUpdate $ \x ->
520520
logWith recorder Debug $ LogKnownFilesUpdated x
521521
return $ toNoFileKey GetKnownTargets

ghcide/src/Development/IDE/Core/FileExists.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ getFileExistsMapUntracked = do
106106
FileExistsMapVar v <- getIdeGlobalAction
107107
return v
108108

109-
-- | Modify the global store of file exists.
109+
-- | Modify the global store of file exists and return the keys that need to be mark as dirty
110110
modifyFileExists :: IdeState -> [(NormalizedFilePath, FileChangeType)] -> IO [Key]
111111
modifyFileExists state changes = do
112112
FileExistsMapVar var <- getIdeGlobalState state

ghcide/src/Development/IDE/Core/Shake.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,8 +1225,9 @@ defineEarlyCutoff' doDiagnostics cmp key file mbOld mode action = do
12251225
return $ RunResult
12261226
(if eq then ChangedRecomputeSame else ChangedRecomputeDiff)
12271227
(encodeShakeValue bs)
1228-
(A res)
1229-
(setValues state key file res (Vector.fromList diags) >> modifyTVar' dirtyKeys (deleteKeySet $ toKey key file))
1228+
(A res) $ do
1229+
setValues state key file res (Vector.fromList diags)
1230+
modifyTVar' dirtyKeys (deleteKeySet $ toKey key file)
12301231
return res
12311232
where
12321233
-- Highly unsafe helper to compute the version of a file

ghcide/src/Development/IDE/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import Control.Concurrent.STM.Stats (dumpSTMStats)
1818
import Control.Exception.Safe (SomeException,
1919
catchAny,
2020
displayException)
21-
import Control.Monad.Extra (concatMapM, join,
22-
unless, when)
21+
import Control.Monad.Extra (concatMapM, unless, when)
2322
import Control.Monad.IO.Class (liftIO)
2423
import qualified Data.Aeson as J
2524
import Data.Coerce (coerce)

0 commit comments

Comments
 (0)