haskell / haskell/haskell-language-server
Support refactoring the export list
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
## 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.
- [X] [Exporting an already used symbol](https://github.com/haskell/haskell-language-server/pull/4952)
- [X] [Unexporting a symbol.](https://github.com/haskell/haskell-language-server/pull/4991)
- [ ] 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.