forked from ProofGeneral/PG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ProofGeneral#781 PG does not position to error.
Tests is also added to check the exact position of the error highlighting. Description of the fix. We cannot use the " ^^^ " thing to compute the error location because commands are not stripped of newlines anymore (ProofGeneral#774). Solution: use the character position information given in the error message with the following subtleties: - position are given by coq **bytes** positions. - position given by coq is the position from the previous "." fed to coq. I.e. we must be careful to strip any blank after the final "." of a command. - Coq < 8.11 has a small glitch on positions, the test is compatible with both behaviour. - coq <= 8.20 has a bug on position for curly braces. In the test we make the disappearing timeout of overlay bigger so that tests don't fail on slow VMs (maybe useless).
- Loading branch information
Showing
4 changed files
with
138 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Lemma false_proof : forall A B : bool, A = B. | ||
Proof. | ||
intros A B. | ||
destruct A. | ||
destruct B. | ||
reflexivity. (*error*) | ||
} | ||
Qed. (*test-lemma*) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters