diff options
author | Jason Gross <jgross@mit.edu> | 2017-04-04 17:44:29 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-04-04 17:44:29 -0400 |
commit | 574d8ba0dec35e1f13674d38f1430358576df1a2 (patch) | |
tree | cf6ba8291e7dba0e71fc521f2d15bc2c108646e0 /src/Util/Tactics | |
parent | b305156e01725fb9a5e70f0a33131554a0530adc (diff) |
Add Tactics.PrintContext
Diffstat (limited to 'src/Util/Tactics')
-rw-r--r-- | src/Util/Tactics/PrintContext.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Util/Tactics/PrintContext.v b/src/Util/Tactics/PrintContext.v new file mode 100644 index 000000000..1a774bdfc --- /dev/null +++ b/src/Util/Tactics/PrintContext.v @@ -0,0 +1,12 @@ +Ltac print_context _ := + lazymatch goal with + | [ H : ?T |- False ] + => try ((clear H || fail 10000 "Anomaly in print_context: could not clear" H); print_context (); fail); + match goal with + | _ => let body := (eval cbv delta [H] in H) in + idtac H ":=" body ":" T + | _ => idtac H ":" T + end + | [ |- False ] => idtac + | [ |- _ ] => try (exfalso; print_context (); fail) + end. |