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

Intention to generate pattern matching clauses #253

Open
marat-rkh opened this issue Mar 19, 2021 · 0 comments
Open

Intention to generate pattern matching clauses #253

marat-rkh opened this issue Mar 19, 2021 · 0 comments

Comments

@marat-rkh
Copy link
Member

Suppose I have some function:
\func foo (n m : Nat) : Bool => {?}

Naturally, I first write its signature and leave => {?} as a result, because I don't know what will be there. Now I realize I want to do a pattern matching. Currently, I can do it like this:

  1. Remove => {?}
  2. Jump to error at \func that says "Some clauses are missing" and invoke a quick fix to generate them.

I think having an intention to do these 2 steps in one go would be more convenient. That intention should be available at {?}.
A similar intention for pattern matching with \elim could be added too. It would:

  1. Replace => {?} with \elim <caret>, which should be a template.
  2. After you fill in the parameters and finish the template, IDE should generate clauses.
@marat-rkh marat-rkh changed the title Intention to generate pattern patching clauses Intention to generate pattern matching clauses May 7, 2021
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

No branches or pull requests

1 participant