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

Code action: Expand catch all variant #987

Merged
merged 4 commits into from
May 25, 2024

Conversation

zth
Copy link
Collaborator

@zth zth commented May 25, 2024

code-action-expand-catch-all

Code action for expanding catch-all patterns. Useful when you want to go from a catch all to get exhaustive matching when you add new variant members, for example.

Works on:

  • Variant
  • Polyvariant
  • Option of variant
  • Option of polyvariant

Those are the ones I thought made sense to support without this snowballing in complexity.

@zth zth requested a review from cristianoc May 25, 2024 19:32
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow

@zth zth merged commit 0f2ab3b into master May 25, 2024
6 checks passed
@zth zth deleted the code-action-expand-catch-all-variant branch May 25, 2024 20:54
jfrolich pushed a commit to jfrolich/rescript-vscode that referenced this pull request Sep 3, 2024
* code action for expanding catch all with variants

* make work with polyvariants

* extend to work on options

* changelog + fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants