coqcoqide

Is there a way to redirect Coqide messages and errors to the same output?


I have a tactic whose expected behavior is to output an error message, and I want to run it in batch mode on a series of goals and for each goal, I want to record the goal and the error message from the tactic. It seems like I can't do this with coqc since it will not continue on failure, so I'm doing this on Coqide. The closest I've been able to come to a solution is to have my file to have goals that look like this:

Theorem/Lemma blah.
Proof. Show. my_tactic. Admitted.

The first problem with this is that Show doesn't retain the proof goals in the Messages tab of Coqide through the run of the file, and the second is that while the output of the tactic is retained in the Errors tab, I am not able to copy it. Any help would be appreciated. Thanks!


Solution

  • Try using the "Fail" command. This is with 8.13 (with master the contexts and errors are not correctly interleaved). I didn't try 8.14-8.17. You need to run all of the input with "run to end" or "run to cursor"; single stepping will block you at the first error:

    Fail command example