purescript-0.12.5: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Ide.Usage

Synopsis

Documentation

findReexportingModules Source #

Arguments

:: (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

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:

  1. Find all modules that reexport the given declaration
  2. 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.
  3. Apply the collected search specifications and collect the results