File tree 2 files changed +8
-6
lines changed
ghcide/src/Development/IDE 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ lookupMod HieDbWriter{indexQueue} hieFile moduleName uid _boot = MaybeT $ do
75
75
moduleSource <- hie_hs_src <$> loadHieFile (mkUpdater nc) hieFile
76
76
BS. writeFile writeOutPath moduleSource
77
77
liftIO $ atomically $
78
- unGetTQueue indexQueue $ \ withHieDb -> withHieDb $ \ db -> do
79
- HieDb. addSrcFile db hieFile writeOutPath False
78
+ unGetTQueue indexQueue $ \ withHieDb -> do
79
+ withHieDb $ \ db ->
80
+ HieDb. addSrcFile db hieFile writeOutPath False
80
81
putMVar completionToken ()
81
82
pure $ moduleUri
82
83
where
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ module Development.IDE.Types.HscEnvEq
15
15
import Control.Concurrent.Async (Async , async , waitCatch )
16
16
import Control.Concurrent.MVar (newEmptyMVar , putMVar , readMVar )
17
17
import Control.Concurrent.STM (atomically )
18
- import Control.Concurrent.STM.TQueue (unGetTQueue )
18
+ import Control.Concurrent.STM.TQueue (writeTQueue )
19
19
import Control.Concurrent.Strict (modifyVar , newVar )
20
20
import Control.DeepSeq (force )
21
21
import Control.Exception (evaluate , mask , throwIO )
@@ -133,9 +133,10 @@ newHscEnvEqWithImportPaths envImportPaths recorder se hscEnv deps = do
133
133
deleteMissingDependencySources :: IO ()
134
134
deleteMissingDependencySources = do
135
135
completionToken <- newEmptyMVar
136
- atomically $ unGetTQueue (indexQueue $ hiedbWriter se) $
137
- \ withHieDb -> withHieDb $ \ db -> do
138
- removeDependencySrcFiles db
136
+ atomically $ writeTQueue (indexQueue $ hiedbWriter se) $
137
+ \ withHieDb -> do
138
+ withHieDb $ \ db ->
139
+ removeDependencySrcFiles db
139
140
putMVar completionToken ()
140
141
readMVar completionToken
141
142
indexPackageHieFiles :: Package -> [Module ] -> IO ()
You can’t perform that action at this time.
0 commit comments