Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- findReexportingModules :: (ModuleName, IdeDeclaration) -> ModuleMap [IdeDeclarationAnn] -> [ModuleName]
- directDependants :: IdeDeclaration -> ModuleMap Module -> ModuleName -> ModuleMap (NonEmpty Search)
- eligibleModules :: (ModuleName, IdeDeclaration) -> ModuleMap [IdeDeclarationAnn] -> ModuleMap Module -> ModuleMap (NonEmpty Search)
- applySearch :: Module -> Search -> [SourceSpan]
- findUsages :: (MonadIO m, Ide m) => IdeDeclaration -> ModuleName -> m (ModuleMap (NonEmpty SourceSpan))
Documentation
findReexportingModules Source #
:: (ModuleName, IdeDeclaration) | The declaration and the module it is defined in for which we are searching usages |
-> ModuleMap [IdeDeclarationAnn] | Our declaration cache. Needs to have reexports resolved |
-> [ModuleName] | All the modules that reexport the declaration. This does NOT include the defining module |
directDependants :: IdeDeclaration -> ModuleMap Module -> ModuleName -> ModuleMap (NonEmpty Search) Source #
eligibleModules :: (ModuleName, IdeDeclaration) -> ModuleMap [IdeDeclarationAnn] -> ModuleMap Module -> ModuleMap (NonEmpty Search) Source #
applySearch :: Module -> Search -> [SourceSpan] Source #
Finds all usages for a given Search
throughout a module
findUsages :: (MonadIO m, Ide m) => IdeDeclaration -> ModuleName -> m (ModuleMap (NonEmpty SourceSpan)) Source #
How we find usages, given an IdeDeclaration and the module it was defined in:
- Find all modules that reexport the given declaration
- Find all modules that import from those modules, and while traversing the imports build a specification for how the identifier can be found in the module.
- Apply the collected search specifications and collect the results