fix(frontends/lean/pp): fix bug in the pretty printer

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-25 08:30:30 -07:00
parent 15c1e39f88
commit e7c7d5718a
2 changed files with 17 additions and 4 deletions

View file

@ -162,10 +162,12 @@ auto pretty_fn::pp_const(expr const & e) -> result {
n = *it;
} else {
for (name const & ns : get_namespaces(m_env)) {
name new_n = n.replace_prefix(ns, name());
if (new_n != n) {
n = new_n;
break;
if (!ns.is_anonymous()) {
name new_n = n.replace_prefix(ns, name());
if (new_n != n) {
n = new_n;
break;
}
}
}
}

11
tests/lean/run/crash.lean Normal file
View file

@ -0,0 +1,11 @@
import logic
section
hypothesis P : Prop.
theorem crash
:= assume H : P,
have H' : ¬ P,
from H,
_.