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

RFC: show robust tactic state #4181

Open
fpvandoorn opened this issue May 15, 2024 · 2 comments
Open

RFC: show robust tactic state #4181

fpvandoorn opened this issue May 15, 2024 · 2 comments
Labels
RFC Request for comments

Comments

@fpvandoorn
Copy link
Contributor

fpvandoorn commented May 15, 2024

Proposal

The goal of this RFC is to have the tactic state not change too much while typing.
This is a complaint I have heard more than once from beginners: "The goal state is jumping around too much". You can pause the goal state, but this is a bit of an inconvenient workaround.

Examples with current behavior:

-- in each example place the pointer right before the `--`
example : True ∧ False ∧ True := by
  simp only [false_and]
  ex -- <no tactic state> / errors: unknown tactic & unsolved goals

example : True ∧ False ∧ True := by
  simp only [false_and]
  exact -- Tactic state: No goals / error: unexpected token 

example : True ∧ False ∧ True := by
  simp only [false_and]
  exact true -- Shows the correct tactic state / error: type mismatch

example : True ∧ False ∧ True := by
  simp only [false_and]
  exact true_ -- Tactic state: No goals / error: unknown identifier

example : True ∧ False ∧ True := by
  simp only [false_and]
  apply true_ -- Shows the correct tactic state / error: unknown identifier

Desired behavior: All examples should show the tactic state that is shown in examples 3 and 5.

  • User Experience: This should be a improvement for all users.

  • Beneficiaries: Especially new users, slow typers. But can benefit anyone that tries to apply a tactic, see that it errors, and wants to easily see the previous tactic state.

  • Maintainability: Should not significantly impact maintainability.

Implementation speculation: Hopefully the first example can be fixed by having a rule that any non-existent tactic still shows the tactic state from the start of the line. And maybe example 2 can be fixed by having a parse error do the same?
Example 4 can probably be fixed in the implementation of exact (it works with apply, see example 5).

Community Feedback

Zulip

Impact

Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.

@fpvandoorn fpvandoorn added the RFC Request for comments label May 15, 2024
@nomeata
Copy link
Collaborator

nomeata commented May 15, 2024

Just crosslinking my work in that direction at #4177.

You describe a fine goal; what I don't know though if there is going to be a simple catch-all solution, or if improved usability here is going to be a game of whack a mole where we fix different ”error conditions” one after another.

@fpvandoorn
Copy link
Contributor Author

I expect that this will be a bit of whack-a-mole (see Implementation speculation in my first message). If it works in the 90% most common cases, that is already very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comments
Projects
None yet
Development

No branches or pull requests

2 participants