coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: t x <txrev319 AT gmail.com>
- To: Jason Gross <jasongross9 AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Debugging Notations
- Date: Wed, 28 Aug 2013 21:08:58 +0000
I like the second approach +
(with-current-buffer "*response*" (let ((inhibit-read-only t) (s (buffer-string))) (erase-buffer) (insert (replace-regexp-in-string "\\?[0-9]+" "" s)) ))
On Wed, Aug 28, 2013 at 7:10 PM, Jason Gross <jasongross9 AT gmail.com> wrote:
If you have a particular broken notation, you can debug it by making the following straightforward transformation:Require Import String.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) eFooand 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.