Description
is a mutable table of names exported by modules in the local project that is used to drive import quick fixes.
The current implementation populates the table by
-
Typechecking all the project modules at startup:
haskell-language-server/ghcide/session-loader/Development/IDE/Session.hs
Lines 400 to 410 in 861c8bf
-
Refreshing on every kick:
haskell-language-server/ghcide/src/Development/IDE/Core/OfInterest.hs
Lines 111 to 120 in 2ee2943
1 could be replaced by a hiedb query, assuming that the hiedb is fully uptodate. This may not be always the case for a new project, but it will work fine on a project that has previously been loaded and type checked.
2 does a lot of work when checkProject
is disabled, by scanning all the transitive dependencies. If we switch 1 to use hiedb we can also make it unconditional and then eliminate the transitive scan from 2.