@@ -117,14 +117,7 @@ insertModule module' = do
117117 liftIO . atomically $ insertModuleSTM stateVar module'
118118
119119-- | 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+
128121
129122-- | Retrieves the FileState from the State. This includes loaded Externfiles
130123-- and parsed Modules
@@ -231,13 +224,14 @@ populateVolatileState = do
231224
232225-- | STM version of populateVolatileState
233226populateVolatileStateSTM
234- :: TVar IdeState
227+ :: FilePath
235228 -> 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
238231 -- We're not using the cached rebuild for anything other than preserving it
239232 -- through the repopulation
240- rebuildCache <- vsCachedRebuild <$> getVolatileStateSTM ref
233+ rebuildCache <- vsCachedRebuild <$> getVolatileStateSTM outputPath
234+
241235 let asts = map (extractAstInformation . fst ) modules
242236 let (moduleDeclarations, reexportRefs) = unzip (Map. map convertExterns externs)
243237 results =
0 commit comments