Skip to content

Commit 146dab6

Browse files
committed
adapt says
1 parent d81357c commit 146dab6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Mathlib/Tactic/Says.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def evalTacticCapturingTryThis (tac : TSyntax `tactic) : TacticM (TSyntax ``tact
9393
let tryThis ← match msg.dropPrefix? "Try this:" with
9494
| none => throwError m!"Tactic output did not begin with 'Try this:': {msg}"
9595
| some S => pure S.toString.removeLeadingSpaces
96-
match parseAsTacticSeq (← getEnv) tryThis.trim with
96+
let tryThis := tryThis.trim
97+
let tryThis := tryThis.dropPrefix? "[apply] " |>.map (·.toString) |>.getD tryThis
98+
match parseAsTacticSeq (← getEnv) tryThis with
9799
| .ok stx => return stx
98100
| .error err => throwError m!"Failed to parse tactic output: {tryThis}\n{err}"
99101

0 commit comments

Comments
 (0)