Skip to content
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

Merged
merged 8 commits into from Feb 28, 2021
Merged

Conversation

isovector
Copy link
Collaborator

@isovector isovector commented Feb 28, 2021

This PR adds a Use constructor <x> code action. It only runs on data types with small numbers of constructors (not HsExpr) in order to not spam the code action list.

Fixes isovector#21
Subsumes #521

@googleson78
Copy link
Contributor

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?

@isovector
Copy link
Collaborator Author

@pepeiborra implemented configurable option. PTAL

@isovector
Copy link
Collaborator Author

@googleson78 oh, I didn't even think of that. Great idea. I'll implement it here.

@isovector
Copy link
Collaborator Author

@googleson78 done. Mind checking the tests in 3d79859 and making sure you agree with them?

@googleson78
Copy link
Contributor

They seem ok. Nice that other tactics machinery can be reused here!

Missing features were accidentally blocking all code actions
@isovector isovector added the merge me Label to trigger pull request merge label Feb 28, 2021
@mergify mergify bot merged commit b0390ac into haskell:master Feb 28, 2021
@isovector isovector deleted the expose-split branch March 1, 2021 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Expose split tactic
3 participants