src/Util/Tactics/PrintContext.v
raw| 1 | Ltac print_context _ := |
| 2 | lazymatch goal with |
| 3 | | [ H : ?T |- False ] |
| 4 | => try ((clear H || fail 10000 "Anomaly in print_context: could not clear" H); print_context (); fail); |
| 5 | match goal with |
| 6 | | _ => let body := (eval cbv delta [H] in H) in |
| 7 | idtac H ":=" body ":" T |
| 8 | | _ => idtac H ":" T |
| 9 | end |
| 10 | | [ |- False ] => idtac |
| 11 | | [ |- _ ] => try (exfalso; print_context (); fail) |
| 12 | end. |