Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coqpp's error messages are uninformative #10866

Open
JasonGross opened this issue Oct 9, 2019 · 2 comments
Open

coqpp's error messages are uninformative #10866

JasonGross opened this issue Oct 9, 2019 · 2 comments
Labels
kind: user messages Improvement of error messages, new warnings, etc. part: tools Coqdoc, coq_makefile, etc.

Comments

@JasonGross
Copy link
Member

Description of the problem

When I run coqpp on

DECLARE PLUGIN "foo"

VERNAC COMMAND EXTEND foo CLASSIFIED AS SIDEFF
| [ "Foo" ] -> { }
END

VERNAC COMMAND EXTEND Bar CLASSIFIED AS SIDEFF
| [ "Bar" ] -> { () }
END

I get

File "src/Util/plugins/foo.mlg", line 5, characters 58-59:
Error: Syntax error: operator expected.

Line 5 has only three characters, END, so I don't know what 58-59 are, and what is an operator, and why is it expected.

If I try inserting ;; after END, then I just get

File "src/Util/plugins/foo.mlg", line 5, characters 3-4:
Error: syntax error

What is the invalid syntax, and what's expected?

cc @ppedrot

Coq Version

59079a2

@JasonGross
Copy link
Member Author

Also, "Error: Syntax error: operator expected." is a horrible error message for "type is a reserved keyword" (or something like that) (and it shows up on characters 75-79 of the line }).

{

open Stdarg

}

DECLARE PLUGIN "foo"

VERNAC COMMAND EXTEND Foo CLASSIFIED AS SIDEFF
  | [ "Foo" constr(type) ] -> {
    ()
  }
END

gives

File "src/Util/plugins/foo.mlg", line 12, characters 75-79:
Error: Syntax error: operator expected.

@SkySkimmer
Copy link
Contributor

The error is actually from ocamldep, coqpp produces a .ml file without complaint.

@Alizter Alizter added kind: user messages Improvement of error messages, new warnings, etc. needs: triage The validity of this issue needs to be checked, or the issue itself updated. part: tools Coqdoc, coq_makefile, etc. labels Sep 29, 2021
@SkySkimmer SkySkimmer removed the needs: triage The validity of this issue needs to be checked, or the issue itself updated. label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: user messages Improvement of error messages, new warnings, etc. part: tools Coqdoc, coq_makefile, etc.
Projects
None yet
Development

No branches or pull requests

3 participants