This PR adds support for interactivity to the combined "try this" messages that were introduced in #9966. In doing so, it moves the link to apply a suggestion to a separate `[apply]` button in front of the suggestion. Hints with diffs remain unchanged, as they did not previously support interacting with terms in the diff, either. <img width="379" height="256" alt="Suggestion with interactive message" src="https://github.com/user-attachments/assets/7838ebf6-0613-46e7-bc88-468a05acbf51" />
26 lines
408 B
Text
26 lines
408 B
Text
def f : Bool → Bool
|
|
| true => true
|
|
| false => false
|
|
|
|
example : f true = true := by simp!
|
|
|
|
/--
|
|
info: Try this:
|
|
[apply] simp! only [f]
|
|
-/
|
|
#guard_msgs in
|
|
example : f true = true := by simp?!
|
|
|
|
/--
|
|
info: Try this:
|
|
[apply] simp_all! only [f]
|
|
-/
|
|
#guard_msgs in
|
|
example : f true = true := by simp_all?!
|
|
|
|
/--
|
|
info: Try this:
|
|
[apply] dsimp! only [f]
|
|
-/
|
|
#guard_msgs in
|
|
example : f true = true := by dsimp?!
|