Is your enhancement request related to a problem? Please describe.
HLS doesn't provide that many tools for working with a module's export list. IIRC the only one is when a diagnostic is raised on an unused symbol, the refactor plugin offers to export the symbol. It would be nice if there were more utilities.
Describe the solution you'd like
There's a few tools I can imagine being useful.
- Exporting an already used symbol (one that doesn't raise a diagnostic because it's used in an already exported symbol)
- Unexporting a symbol.
- Exporting all symbols in a module.
- Turning a module with blanket exports into one that minimally exports according to in-project usages.
Of these (4) is the one I really want, where I often manually go over each exported symbol, do a "find all references" request, and trim the export list if there are no usages. It's also the hardest one to implement. First step is to probably limit the code action to non-exposed modules (not listed in .cabal exposed-modules list).
This subsumes the existing diagnostic-only action in the refactor plugin.
Is your enhancement request related to a problem? Please describe.
HLS doesn't provide that many tools for working with a module's export list. IIRC the only one is when a diagnostic is raised on an unused symbol, the refactor plugin offers to export the symbol. It would be nice if there were more utilities.
Describe the solution you'd like
There's a few tools I can imagine being useful.
Of these (4) is the one I really want, where I often manually go over each exported symbol, do a "find all references" request, and trim the export list if there are no usages. It's also the hardest one to implement. First step is to probably limit the code action to non-exposed modules (not listed in
.cabalexposed-moduleslist).This subsumes the existing diagnostic-only action in the
refactorplugin.