@@ -117,14 +117,7 @@ insertModule module' = do
117
117
liftIO . atomically $ insertModuleSTM stateVar module'
118
118
119
119
-- | STM version of insertModule
120
- insertModuleSTM :: TVar IdeState -> (FilePath , P. Module ) -> STM ()
121
- insertModuleSTM ref (fp, module') =
122
- modifyTVar ref $ \ x ->
123
- x { ideFileState = (ideFileState x) {
124
- fsModules = Map. insert
125
- (P. getModuleName module')
126
- (module', fp)
127
- (fsModules (ideFileState x))}}
120
+
128
121
129
122
-- | Retrieves the FileState from the State. This includes loaded Externfiles
130
123
-- and parsed Modules
@@ -231,13 +224,14 @@ populateVolatileState = do
231
224
232
225
-- | STM version of populateVolatileState
233
226
populateVolatileStateSTM
234
- :: TVar IdeState
227
+ :: FilePath
235
228
-> STM (ModuleMap (ReexportResult [IdeDeclarationAnn ]))
236
- populateVolatileStateSTM ref = do
237
- IdeFileState {fsExterns = externs, fsModules = modules} <- getFileStateSTM ref
229
+ populateVolatileStateSTM outputPath = do
230
+ -- IdeFileState{fsExterns = externs, fsModules = modules} <- getFileStateSTM outputPath
238
231
-- We're not using the cached rebuild for anything other than preserving it
239
232
-- through the repopulation
240
- rebuildCache <- vsCachedRebuild <$> getVolatileStateSTM ref
233
+ rebuildCache <- vsCachedRebuild <$> getVolatileStateSTM outputPath
234
+
241
235
let asts = map (extractAstInformation . fst ) modules
242
236
let (moduleDeclarations, reexportRefs) = unzip (Map. map convertExterns externs)
243
237
results =
0 commit comments