coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: t x <txrev319 AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Debugging Notations
- Date: Wed, 28 Aug 2013 15:10:13 -0400
If you have a particular broken notation, you can debug it by making the following straightforward transformation:
Require Import String.
On Wednesday, August 28, 2013, t x wrote:
Local Open Scope string_scope.
Notation "'bFoo' A 'eFoo'" := (A, "+", 2) (only parsing).
Eval simpl in (bFoo 2 eFoo).
Eval simpl in (bFoo false eFoo).
I don't know of a good way to do this automatically.
Alternatively, you could protect all of your variables with evars, e.g.,
Eval simpl in bFoo (_ false) eFoo
and then mentally discard all the ?n. (And, again, the (only parsing) annotation is your friend here.)
-Jason
On Wednesday, August 28, 2013, t x wrote:
Seeing "(false + 2)" would make debugging much easier than just a "got bool; expected Z"Is there a way to put in a [2.5] --> print out what _expression_ is, before it is type checked?[4] report type check error[3] type-check[2] (false + 2)[1] (bFoo false eFoo)This is not particularly useful on larger examples.Consider the following minimal failure example:Right now, all I get is: a complaint of "got bool while expectig Z"
Notation "'bFoo' A 'eFoo'" := (A + 2). Eval simpl in (bFoo 2 eFoo). Eval simpl in (bFoo false eFoo).
The process appears to be:
Thanks!
- [Coq-Club] Debugging Notations, t x, 08/28/2013
- Re: [Coq-Club] Debugging Notations, Jason Gross, 08/28/2013
- Re: [Coq-Club] Debugging Notations, t x, 08/28/2013
- Re: [Coq-Club] Debugging Notations, Jason Gross, 08/28/2013
Archive powered by MHonArc 2.6.18.