Skip to content

Solve the Index Symbols Reliability Problem #4

Description

@picnoir

We are currently using a wrong approach to index a file's used symbols (see indexModule in the ProcessingSteps.hs file). Basically, we are looking at the modules provided by the package dependencies and filtering them accordingly to the imported modules. This is obviously a rough approximation. This results in lots of false positive/missed match and makes this software hardly usable. TL;DR our approximation does not perform really well.

So far, we did not find a way to get the GHC's Name for every symbol coming out of the parser. Basically, we are getting the parser output token stream and we did not find a way to get the resolved Name of the parsed symbols without traversing the whole GHC AST contained in the ModSummary.

I guess the problem here is mostly me being unfamiliar with GHC's API, the solution will hopefully be obvious to somebody with more experience.

I see two potential starting points to address this issue:

  1. We keep the current approach of using the parser output and we use HARE's approach and create a mapping between the tokens location and their names. <= @NinjaTrappeur favorite approach
  2. We bite the bullet and try to retrieve every symbol usage by traversing the GHC starting by the desugared ModuleSummary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ChallengingChallenging IssueTodoValidated Issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions