File tree 1 file changed +4
-5
lines changed
ghcide/src/Development/IDE/Core
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -573,12 +573,11 @@ indexHieFile se mod_summary srcPath hash hf = atomically $ do
573
573
mdone <- atomically $ do
574
574
-- Remove current element from pending
575
575
modifyTVar' indexPending $ HashMap. update (\ pendingHash -> guard (pendingHash /= hash) $> pendingHash) srcPath
576
+ modifyTVar' indexCompleted (+ 1 )
576
577
pending <- readTVar indexPending
577
- if HashMap. null pending
578
- then Just <$> swapTVar indexCompleted 0
579
- else do
580
- modifyTVar' indexCompleted (+ 1 )
581
- pure Nothing
578
+ -- If we are done, report and reset completed
579
+ whenMaybe (HashMap. null pending) $
580
+ swapTVar indexCompleted 0
582
581
when (coerce $ ideTesting se) $
583
582
eventer se $ LSP. NotCustomServer $
584
583
LSP. NotificationMessage " 2.0" (LSP. CustomServerMethod " ghcide/reference/ready" ) (toJSON $ fromNormalizedFilePath srcPath)
You can’t perform that action at this time.
0 commit comments