Language.PureScript.Ide.State

purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Ide.State

Description

Functions to access psc-ide's state

Synopsis

- getLoadedModulenames :: Ide m => m [ModuleName]
- getExternFiles :: Ide m => m (ModuleMap ExternsFile)
- getFileState :: Ide m => m IdeFileState
- resetIdeState :: Ide m => m ()
- cacheRebuild :: Ide m => ExternsFile -> m ()
- cachedRebuild :: Ide m => m (Maybe (ModuleName, ExternsFile))
- insertExterns :: Ide m => ExternsFile -> m ()
- insertModule :: Ide m => (FilePath, Module) -> m ()
- insertExternsSTM :: TVar IdeState -> ExternsFile -> STM ()
- getAllModules :: Ide m => Maybe ModuleName -> m (ModuleMap [IdeDeclarationAnn])
- populateVolatileState :: Ide m => m (Async ())
- populateVolatileStateSync :: (Ide m, MonadLogger m) => m ()
- populateVolatileStateSTM :: TVar IdeState -> STM (ModuleMap (ReexportResult [IdeDeclarationAnn]))
- getOutputDirectory :: Ide m => m FilePath
- updateCacheTimestamp :: Ide m => m (Maybe (Maybe UTCTime, Maybe UTCTime))
- resolveOperatorsForModule :: ModuleMap [IdeDeclarationAnn] -> [IdeDeclarationAnn] -> [IdeDeclarationAnn]
- resolveInstances :: ModuleMap ExternsFile -> ModuleMap [IdeDeclarationAnn] -> ModuleMap [IdeDeclarationAnn]
- resolveDataConstructorsForModule :: [IdeDeclarationAnn] -> [IdeDeclarationAnn]

# Documentation

getLoadedModulenames :: Ide m => m [ModuleName] #

Gets the loaded Modulenames

getExternFiles :: Ide m => m (ModuleMap ExternsFile) #

Gets all loaded ExternFiles

getFileState :: Ide m => m IdeFileState #

Retrieves the FileState from the State. This includes loaded Externfiles and parsed Modules

resetIdeState :: Ide m => m () #

Resets all State inside psc-ide

cacheRebuild :: Ide m => ExternsFile -> m () #

Sets rebuild cache to the given ExternsFile

cachedRebuild :: Ide m => m (Maybe (ModuleName, ExternsFile)) #

Retrieves the rebuild cache

insertExterns :: Ide m => ExternsFile -> m () #

Adds an ExternsFile into psc-ide's FileState. This does not populate the VolatileState, which needs to be done after all the necessary Externs and SourceFiles have been loaded.

insertModule :: Ide m => (FilePath, Module) -> m () #

Insert a Module into Stage1 of the State

insertExternsSTM :: TVar IdeState -> ExternsFile -> STM () #

STM version of insertExterns

getAllModules :: Ide m => Maybe ModuleName -> m (ModuleMap [IdeDeclarationAnn]) #

Checks if the given ModuleName matches the last rebuild cache and if it does returns all loaded definitions + the definitions inside the rebuild cache

populateVolatileState :: Ide m => m (Async ()) #

populateVolatileStateSync :: (Ide m, MonadLogger m) => m () #

Resolves reexports and populates VolatileState with data to be used in queries.

populateVolatileStateSTM :: TVar IdeState -> STM (ModuleMap (ReexportResult [IdeDeclarationAnn])) #

STM version of populateVolatileState

getOutputDirectory :: Ide m => m FilePath #

updateCacheTimestamp :: Ide m => m (Maybe (Maybe UTCTime, Maybe UTCTime)) #

resolveOperatorsForModule :: ModuleMap [IdeDeclarationAnn] -> [IdeDeclarationAnn] -> [IdeDeclarationAnn] #

Looks up the types and kinds for operators and assigns them to their declarations

resolveInstances :: ModuleMap ExternsFile -> ModuleMap [IdeDeclarationAnn] -> ModuleMap [IdeDeclarationAnn] #

resolveDataConstructorsForModule :: [IdeDeclarationAnn] -> [IdeDeclarationAnn] #