After this commit, new interactice tactic classes can be added without
writing C++ code (see example: tests/lean/run/my_tac_class.lean).
The tactic_evaluator was simplified, and all the complexity has been
moved to tactic_notation, and lean code.
We can now inspect the intermediate states produced by the rewrite
tactic.
The function (@scope_trace _ line col thunk) can be used to position trace
messages produced by thunk. If line/col are not provided (i.e., we
just write (scope_trace thunk)), then line/col are filled with the
position of this term by the elaborator.
We can visualize the intermediate tactic states inside nested blocks
such as (try { ... })
The new infrastructure can be used to implement custom tactic_state
pretty printers.
75 lines
1.3 KiB
Text
75 lines
1.3 KiB
Text
auto_quote_error2.lean:5:2: error: invalid apply tactic, failed to unify
|
||
a = c
|
||
with
|
||
?m_2 = ?m_2
|
||
state:
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ a = c
|
||
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ Type ?
|
||
auto_quote_error2.lean:8:0: error: failed
|
||
state:
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ a = c
|
||
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ Type ?
|
||
hello world
|
||
auto_quote_error2.lean:16:2: error: focus tactic failed, focused goal has not been solved
|
||
state:
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ a = c
|
||
auto_quote_error2.lean:19:0: error: failed
|
||
state:
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ a = c
|
||
hello world
|
||
auto_quote_error2.lean:28:2: error: focus tactic failed, focused goal has not been solved
|
||
state:
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ a = ?m_1
|
||
auto_quote_error2.lean:30:0: error: failed
|
||
state:
|
||
a b c : ℕ,
|
||
a_1 : a = b,
|
||
a_2 : b = c
|
||
⊢ a = ?m_1
|
||
auto_quote_error2.lean:37:22: error: don't know how to synthesize placeholder
|
||
context:
|
||
a b c : ℕ,
|
||
h1 : a = b,
|
||
h2 : b = c
|
||
⊢ b = c
|
||
auto_quote_error2.lean:37:4: error: elaborator failed
|
||
state:
|
||
a b c : ℕ,
|
||
h1 : a = b,
|
||
h2 : b = c
|
||
⊢ a = c
|
||
auto_quote_error2.lean:38:2: error: failed
|
||
state:
|
||
a b c : ℕ,
|
||
h1 : a = b,
|
||
h2 : b = c
|
||
⊢ a = c
|
||
auto_quote_error2.lean:39:0: error: failed
|
||
state:
|
||
a b c : ℕ,
|
||
h1 : a = b,
|
||
h2 : b = c
|
||
⊢ a = c
|