Skip to content

Completions should not depend on Typecheck #877

Closed
haskell/ghcide
#670
@pepeiborra

Description

@pepeiborra

The ProduceCompletions rule depends on TypeCheck, which means it cannot be computed until typechecking is done.

While this can be addressed by using stale data, I think it would be more elegant to improve the implementation so that it only needs the parsed module + the ModIface of (the transitive closure of) imports and the package database.

Additionally, we could break down ProduceCompletions in two parts:

  1. ProduceCompletionsFromImports
  2. ProduceCompletionsFromLocalModule

The first one would have no dependency on the ParsedModule but only on the ModSummary, which is already smart enough to survive across edits that do not alter the module import list, and therefore only ProduceCompletionsFromLocalModule would need to be recomputed across edits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions