fix(frontends/lean/pp): make pp_have more robust
We should not assume the argument of a have_annotation is a lambda.
This commit is contained in:
parent
01127061f5
commit
f64784378a
1 changed files with 3 additions and 1 deletions
|
@ -730,7 +730,9 @@ auto pretty_fn::pp_pi(expr const & e) -> result {
|
|||
}
|
||||
}
|
||||
|
||||
static bool is_have(expr const & e) { return is_app(e) && is_have_annotation(app_fn(e)); }
|
||||
static bool is_have(expr const & e) {
|
||||
return is_app(e) && is_have_annotation(app_fn(e)) && is_binding(get_annotation_arg(app_fn(e)));
|
||||
}
|
||||
static bool is_show(expr const & e) {
|
||||
return is_show_annotation(e) && is_app(get_annotation_arg(e)) &&
|
||||
is_lambda(app_fn(get_annotation_arg(e)));
|
||||
|
|
Loading…
Reference in a new issue