fix(frontends/lean): process choice-exprs at check_constant_next

This commit is contained in:
Leonardo de Moura 2014-11-02 19:42:30 -08:00
parent c7406d6ce8
commit a2e75159c8
2 changed files with 15 additions and 0 deletions

View file

@ -1111,6 +1111,9 @@ name parser::check_constant_next(char const * msg) {
e = get_explicit_arg(e);
}
while (is_choice(e))
e = get_choice(e, 0);
if (is_constant(e)) {
return const_name(e);
} else {

View file

@ -0,0 +1,12 @@
import data.nat.basic
open nat
definition pred (a : nat) : nat :=
nat.cases_on a
zero
(fun a₁, a₁)
example : pred 1 = 0 :=
rfl
print definition pred