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.
17 lines
674 B
C++
17 lines
674 B
C++
/*
|
|
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Author: Leonardo de Moura
|
|
*/
|
|
#pragma once
|
|
#include "frontends/lean/parser.h"
|
|
namespace lean {
|
|
expr parse_begin_end_expr(parser & p, pos_info const & pos);
|
|
expr parse_curly_begin_end_expr(parser & p, pos_info const & pos);
|
|
expr parse_begin_end(parser & p, unsigned, expr const *, pos_info const & pos);
|
|
expr parse_by(parser & p, unsigned, expr const *, pos_info const & pos);
|
|
expr parse_auto_quote_tactic_block(parser & p, unsigned, expr const *, pos_info const & pos);
|
|
void initialize_tactic_notation();
|
|
void finalize_tactic_notation();
|
|
}
|