Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions to access psc-ide's state
- getLoadedModulenames :: Ide m => m [ModuleName]
- getExternFiles :: Ide m => m (ModuleMap ExternsFile)
- resetIdeState :: Ide m => m ()
- cacheRebuild :: Ide m => ExternsFile -> m ()
- insertExterns :: Ide m => ExternsFile -> m ()
- insertModule :: Ide m => (FilePath, Module) -> m ()
- insertExternsSTM :: TVar IdeState -> ExternsFile -> STM ()
- getAllModules :: Ide m => Maybe ModuleName -> m [(ModuleName, [IdeDeclarationAnn])]
- populateStage2 :: (Ide m, MonadLogger m) => m ()
- populateStage3 :: (Ide m, MonadLogger m) => m ()
- populateStage3STM :: TVar IdeState -> STM (ModuleMap (ReexportResult [IdeDeclarationAnn]))
- resolveOperatorsForModule :: ModuleMap [IdeDeclarationAnn] -> [IdeDeclarationAnn] -> [IdeDeclarationAnn]
- resolveInstances :: ModuleMap ExternsFile -> ModuleMap [IdeDeclarationAnn] -> ModuleMap [IdeDeclarationAnn]
Documentation
getLoadedModulenames :: Ide m => m [ModuleName] Source #
Gets the loaded Modulenames
getExternFiles :: Ide m => m (ModuleMap ExternsFile) Source #
Gets all loaded ExternFiles
resetIdeState :: Ide m => m () Source #
Resets all State inside psc-ide
cacheRebuild :: Ide m => ExternsFile -> m () Source #
Sets rebuild cache to the given ExternsFile
insertExterns :: Ide m => ExternsFile -> m () Source #
Adds an ExternsFile into psc-ide's State Stage1. This does not populate the following Stages, which needs to be done after all the necessary Exterms have been loaded.
insertModule :: Ide m => (FilePath, Module) -> m () Source #
Insert a Module into Stage1 of the State
insertExternsSTM :: TVar IdeState -> ExternsFile -> STM () Source #
STM version of insertExterns
getAllModules :: Ide m => Maybe ModuleName -> m [(ModuleName, [IdeDeclarationAnn])] Source #
Checks if the given ModuleName matches the last rebuild cache and if it does returns all loaded definitions + the definitions inside the rebuild cache
populateStage2 :: (Ide m, MonadLogger m) => m () Source #
Extracts source spans from the parsed ASTs
populateStage3 :: (Ide m, MonadLogger m) => m () Source #
Resolves reexports and populates Stage3 with data to be used in queries.
populateStage3STM :: TVar IdeState -> STM (ModuleMap (ReexportResult [IdeDeclarationAnn])) Source #
STM version of populateStage3
resolveOperatorsForModule :: ModuleMap [IdeDeclarationAnn] -> [IdeDeclarationAnn] -> [IdeDeclarationAnn] Source #
Looks up the types and kinds for operators and assigns them to their declarations