This PR fixes a bug introduced in #7830 where if the cursor is at the indicated position ```lean example (as bs : List Nat) : (as.append bs).length = as.length + bs.length := by induction as with | nil => -- cursor | cons b bs ih => ``` then the Infoview would show "no goals" rather than the `nil` goal. The PR also fixes a separate bug where placing the cursor on the next line after the `induction`/`cases` tactics like in ```lean induction as with | nil => sorry | cons b bs ih => sorry I -- < cursor ``` would report the original goal in the goal list. Furthermore, there are numerous improvements to error recovery (including `allGoals`-type logic for pre-tactics) and the visible tactic states when there are errors. Adds `Tactic.throwOrLogErrorAt`/`Tactic.throwOrLogError` for throwing or logging errors depending on the recovery state.
31 lines
1.6 KiB
Text
31 lines
1.6 KiB
Text
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 2, "character": 3}}
|
|
{"rendered": "```lean\n⊢ True\n```", "goals": ["⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 8, "character": 2}}
|
|
{"rendered": "```lean\ncase succ\nn✝ : Nat\na✝ : True\n⊢ True\n```",
|
|
"goals": ["case succ\nn✝ : Nat\na✝ : True\n⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 13, "character": 3}}
|
|
{"rendered": "```lean\ncase zero\n⊢ True\n```", "goals": ["case zero\n⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 19, "character": 2}}
|
|
{"rendered": "```lean\ncase succ\nn✝ : Nat\na✝ : True\n⊢ True\n```",
|
|
"goals": ["case succ\nn✝ : Nat\na✝ : True\n⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 24, "character": 3}}
|
|
{"rendered": "```lean\n⊢ True\n```", "goals": ["⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 30, "character": 2}}
|
|
{"rendered": "```lean\ncase succ\nn✝ : Nat\na✝ : True\n⊢ True\n```",
|
|
"goals": ["case succ\nn✝ : Nat\na✝ : True\n⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 35, "character": 3}}
|
|
{"rendered": "```lean\ncase zero\n⊢ True\n```", "goals": ["case zero\n⊢ True"]}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 41, "character": 2}}
|
|
{"rendered": "no goals", "goals": []}
|
|
{"textDocument": {"uri": "file:///2881.lean"},
|
|
"position": {"line": 46, "character": 4}}
|
|
{"rendered": "```lean\nthis : True\n⊢ True\n```",
|
|
"goals": ["this : True\n⊢ True"]}
|