You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently ghcide suggests missing imports for Package modules only.
I would do this by enhancing kick to update a ShakeExtras mutable state containing a mapping from names to local modules. Then this mapping can be used by the existing suggestImports code action handler to provide the suggestions. A slight downside of this approach is that removing names from the state would be difficult. Since the names are only used to provide suggestions, this is ok.
As a refinement, use only the parsed AST, not the typed one. For modules with export lists, we only need the mod summary.
As a second refinement, get around the issue with deleted names by validating the suggestions before producing them.
The text was updated successfully, but these errors were encountered:
Might I suggest using hiedb for this? Module exports can be stored in the database (definitions of top level names are already stored, we just need an extra boolean flag in the table to indicate whether the definition is exported).
Actually, due to the possibility of re-exports, we would need a new table in the database.
Currently ghcide suggests missing imports for Package modules only.
I would do this by enhancing
kick
to update aShakeExtras
mutable state containing a mapping from names to local modules. Then this mapping can be used by the existing suggestImports code action handler to provide the suggestions. A slight downside of this approach is that removing names from the state would be difficult. Since the names are only used to provide suggestions, this is ok.As a refinement, use only the parsed AST, not the typed one. For modules with export lists, we only need the mod summary.
As a second refinement, get around the issue with deleted names by validating the suggestions before producing them.
The text was updated successfully, but these errors were encountered: