Skip to content

Commit 00bbcb1

Browse files
authored
No need to delete twice (#1860)
1 parent 53747d1 commit 00bbcb1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ isInterface f = takeExtension (fromNormalizedFilePath f) `elem` [".hi", ".hi-boo
158158
-- | Reset the GetModificationTime state of interface files
159159
resetInterfaceStore :: ShakeExtras -> NormalizedFilePath -> IO ()
160160
resetInterfaceStore state f = do
161-
deleteValue state (GetModificationTime_ True) f
162-
deleteValue state (GetModificationTime_ False) f
161+
deleteValue state GetModificationTime f
163162

164163
-- | Reset the GetModificationTime state of watched files
165164
resetFileStore :: IdeState -> [FileEvent] -> IO ()
@@ -174,8 +173,7 @@ resetFileStore ideState changes = mask $ \_ ->
174173
OfInterestVar foisVar <- getIdeGlobalExtras (shakeExtras ideState)
175174
fois <- readVar foisVar
176175
unless (HM.member (toNormalizedFilePath f) fois) $ do
177-
deleteValue (shakeExtras ideState) (GetModificationTime_ True) (toNormalizedFilePath' f)
178-
deleteValue (shakeExtras ideState) (GetModificationTime_ False) (toNormalizedFilePath' f)
176+
deleteValue (shakeExtras ideState) GetModificationTime (toNormalizedFilePath' f)
179177
_ -> pure ()
180178

181179
-- Dir.getModificationTime is surprisingly slow since it performs

0 commit comments

Comments
 (0)