-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code action to add unused function to export list #157
Comments
Can I take this one? And will this be added in ghcide? |
@sureyeaah Please do! |
The path of least resistance would be ghcide, because that's where all the code actions currently live. Indeed, some of the more heavy weight code actions in ghcide, like the Suggest Imports one, should probably be extracted as HLS plugins too. |
So I'm handling top level variable definitions, newtype/data types/type classeswhile exporting all(e.g. X(..)), type synonyms and pattern synonyms. I'm not dealing with constructors explicitly since that would involve finding the corresponding type in the export list. Thoughts? |
Merged in ghcide. |
You can make a PR to hls to cherry-pick the changes on top of the ghcide submodule, or wait until we eventually get it synced back up with digital-asset/master |
This has been merged in hls master. |
Closed by #348 |
When you have an unused function and an explicit export list in your module it would make sense to offer a code action to add the function to the explicit export list!
Implementation could be done similar to the code in: https://github.com/digital-asset/ghcide/blob/master/src/Development/IDE/Plugin/CodeAction.hs#L140
The text was updated successfully, but these errors were encountered: