File tree 1 file changed +11
-10
lines changed
ghcide/session-loader/Development/IDE
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -136,20 +136,21 @@ runWithDb fp k = do
136
136
`catch` \ IncompatibleSchemaVersion {} -> removeFile fp
137
137
withHieDb fp $ \ writedb -> do
138
138
initConn writedb
139
- -- Clear the index of any files that might have been deleted since the last run
140
- deleteMissingRealFiles writedb
141
- _ <- garbageCollectTypeNames writedb
142
139
chan <- newTQueueIO
143
140
withAsync (writerThread writedb chan) $ \ _ -> do
144
141
withHieDb fp (flip k chan)
145
142
where
146
- writerThread db chan = forever $ do
147
- k <- atomically $ readTQueue chan
148
- k db
149
- `catch` \ e@ SQLError {} -> do
150
- hPutStrLn stderr $ " SQLite error in worker, ignoring: " ++ show e
151
- `catchAny` \ e -> do
152
- hPutStrLn stderr $ " Uncaught error in database worker, ignoring: " ++ show e
143
+ writerThread db chan = do
144
+ -- Clear the index of any files that might have been deleted since the last run
145
+ deleteMissingRealFiles db
146
+ _ <- garbageCollectTypeNames db
147
+ forever $ do
148
+ k <- atomically $ readTQueue chan
149
+ k db
150
+ `catch` \ e@ SQLError {} -> do
151
+ hPutStrLn stderr $ " SQLite error in worker, ignoring: " ++ show e
152
+ `catchAny` \ e -> do
153
+ hPutStrLn stderr $ " Uncaught error in database worker, ignoring: " ++ show e
153
154
154
155
155
156
getHieDbLoc :: FilePath -> IO FilePath
You can’t perform that action at this time.
0 commit comments