From 574d8ba0dec35e1f13674d38f1430358576df1a2 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 4 Apr 2017 17:44:29 -0400 Subject: Add Tactics.PrintContext --- src/Util/Tactics/PrintContext.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/Util/Tactics/PrintContext.v (limited to 'src/Util/Tactics') 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. -- cgit v1.2.3