-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Implement "use constructor" code action #1461
Conversation
plugins/hls-tactics-plugin/src/Ide/Plugin/Tactic/LanguageServer/TacticProviders.hs
Outdated
Show resolved
Hide resolved
Does this currently do any type checking on the suggested constructors? e.g. if the type indices that the constructor uses will match up with the required type. Is it possible to easily do? |
@pepeiborra implemented configurable option. PTAL |
@googleson78 oh, I didn't even think of that. Great idea. I'll implement it here. |
@googleson78 done. Mind checking the tests in 3d79859 and making sure you agree with them? |
They seem ok. Nice that other tactics machinery can be reused here! |
Missing features were accidentally blocking all code actions
This PR adds a
Use constructor <x>
code action. It only runs on data types with small numbers of constructors (notHsExpr
) in order to not spam the code action list.Fixes isovector#21
Subsumes #521