You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6061 Reporter:@gasche Status: acknowledged (set by @gasche on 2013-07-02T14:29:00Z) Resolution: open Priority: normal Severity: feature Version: 4.01.0+dev Target version: later Category: lexing and parsing Child of:#5068
Bug description
When a correctly-parenthesized expression is syntactically incorrect (inside the parens), the error message sometimes only mention the parentheses, which can be very confusing.
The original report comes from user BlankVerse which spelled "fn" instead of "fun", and got the following error:
List.map (fn x -> x) [1;2;3];;
^
Syntax error: ')' expected, the highlighted '(' might be unmatched
Some other wrong-expressions trigger the same behavior, such as "x let x", but some other do not, such as the following better message (pointing at the last parens):
List.map (let x) [1;2;3];;
^
Error: Syntax error
The text was updated successfully, but these errors were encountered:
So, it used to be that the only syntax error message of the compiler was the plain "Syntax error". Users were unhappy about that and demanded more details...
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 6061
Reporter: @gasche
Status: acknowledged (set by @gasche on 2013-07-02T14:29:00Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.01.0+dev
Target version: later
Category: lexing and parsing
Child of: #5068
Bug description
When a correctly-parenthesized expression is syntactically incorrect (inside the parens), the error message sometimes only mention the parentheses, which can be very confusing.
The original report comes from user BlankVerse which spelled "fn" instead of "fun", and got the following error:
List.map (fn x -> x) [1;2;3];;
^
Syntax error: ')' expected, the highlighted '(' might be unmatched
Some other wrong-expressions trigger the same behavior, such as "x let x", but some other do not, such as the following better message (pointing at the last parens):
List.map (let x) [1;2;3];;
^
Error: Syntax error
The text was updated successfully, but these errors were encountered: