feat(frontends/lean/builtin_cmds): expand abbreviations in the 'check' command

see issue #639
This commit is contained in:
Leonardo de Moura 2015-05-29 14:37:06 -07:00
parent 3b7b268e40
commit e6099583ad

View file

@ -26,6 +26,7 @@ Author: Leonardo de Moura
#include "library/print.h"
#include "library/class.h"
#include "library/flycheck.h"
#include "library/abbreviation.h"
#include "library/util.h"
#include "library/user_recursors.h"
#include "library/pp_options.h"
@ -520,6 +521,7 @@ environment end_scoped_cmd(parser & p) {
environment check_cmd(parser & p) {
expr e; level_param_names ls;
std::tie(e, ls) = parse_local_expr(p);
e = expand_abbreviations(p.env(), e);
auto tc = mk_type_checker(p.env(), p.mk_ngen());
expr type = tc->check(e, ls).first;
auto reg = p.regular_stream();