File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
ghcide/src/Development/IDE/Core Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -924,11 +924,10 @@ indexHieFile se mod_summary srcPath !hash hf = do
924
924
-- If the hash in the pending list doesn't match the current hash, then skip
925
925
Just pendingHash -> pendingHash /= hash
926
926
unless newerScheduled $ do
927
- -- Using `finally `, so even if an exception happen during withHieDb call,
927
+ -- Using `bracket `, so even if an exception happen during withHieDb call,
928
928
-- the the ending part of `reportProgress` (which clean the progress indicator) will still be called.
929
929
indexDoneB <- liftIO newBarrier
930
- _ <- liftIO $ async (reportProgress indexDoneB optProgressStyle)
931
- flip finally (signalBarrier indexDoneB () ) $
930
+ bracket_ (liftIO $ async (reportProgress indexDoneB optProgressStyle)) (signalBarrier indexDoneB () ) $
932
931
withHieDb (\ db -> HieDb. addRefsFromLoaded db targetPath (HieDb. RealFile $ fromNormalizedFilePath srcPath) hash hf')
933
932
where
934
933
mod_location = ms_location mod_summary
You can’t perform that action at this time.
0 commit comments