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

Bad error syntax on tuple with trailing comma #7858

vicuna opened this issue Oct 3, 2018 · 2 comments


None yet
4 participants
Copy link

commented Oct 3, 2018

Original bug ID: 7858
Reporter: @gasche
Assigned to: @let-def
Status: assigned (set by @gasche on 2018-10-03T13:14:59Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.08.0+dev/beta1/beta2
Target version: undecided
Category: lexing and parsing
Tags: syntax-error-messages
Monitored by: @nojb

Bug description

Consider the input "(foo,);;"

4.07.0 behaves as follows:

# (foo,);;
Error: Syntax error: operator expected.

Trunk (4.08+dev) behaves as follows:

# (foo,);;
Error: Syntax error: ')' expected
Line 1, characters 0-1: This '(' might be unmatched

Both messages are bad, but arguably the new one is even worse.


This comment has been minimized.

Copy link

commented Apr 6, 2019

Is this bug being handled by anyone? I would like to work on it if not.


This comment has been minimized.

Copy link

commented Apr 6, 2019

@AndrewLitteken: unfortunately, we don't have a good story for syntax error messages right now, and we are planning to change how they are done in a couple OCaml versions. I would encourage you to focus on some other task, because this one is likely to (1) turn out to be more difficult than it looks and (2) have the solution space change quite a bit in 6-12 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.