lean4-htt/tests/lean/1930.lean
Leonardo de Moura 56dba5b98a fix(frontends/lean/elaborator): fixes #1930
@kha the following idiom is not safe
```
   while (is_pi(t)) {
      t = whnf(binding_body(t));
   }
```
`whnf(e)` assumes that `e` does not have dangling deBruijn variables.
We should use (the more expensive):
```
   while (is_pi(t)) {
      t = whnf(instantiate(binding_body(t), locals.push_local_from_binding(t)));
   }
```
BTW, this problem is not related to the assertion violation at #1930
I just stumbled on it when fixing the violation.
2018-02-19 08:51:26 -08:00

3 lines
56 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

structure S := (f : )
def F : S := { f := prod.1 }