Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Ltac, debugging, tricks

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Ltac, debugging, tricks


Chronological Thread 
  • From: t x <txrev319 AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Ltac, debugging, tricks
  • Date: Fri, 6 Sep 2013 19:23:15 +0000

After something like 6 months of Coq, I finally came up with this trick:

Ltac log expr :=
  let l := fresh "log__" in
    set (l := expr).

which I've found to be much more useful than both idtac and "Set Ltac Debug on" for debugging since I can now do things like:

match expr
| blah blah blah => ... ; log ("we're doing XYZ using", x, y, z)
...
end

This now means that when I see unprovable goal, I can look at the log__ strings and understand "what stupidity did I do to get into this unprovable state."


At the risk of starting a chain mail spam -- anyone have really cool Ltac tricks / Ltac debugging tricks that completely changed their ltac development cycle they want to share?


(If you don't want to spam the list, feel free to reply to me only -- I'll happily read duplicate emails in search of cool hacks).


  • [Coq-Club] Ltac, debugging, tricks, t x, 09/06/2013

Archive powered by MHonArc 2.6.18.

Top of Page