Opened 12 years ago

Closed 5 years ago

#459 closed bug (fixed)

Bad parse error message

Reported by: nobody Owned by:
Priority: normal Milestone:
Component: Compiler (Parser) Version: 6.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by simonmar)

Simon asked me to report this very minor "bug".

When compiling a file that looks like:

main = print (1+2

the parser complains (and rightly so). However, it
blames the above on "possibly incorrect indentation",
whereas it is obvious I just forgot a parenthesis.

/Koen Claessen

Change History (12)

comment:1 Changed 12 years ago by simonmar

Description: modified (diff)
Owner: changed from nobody to simonmar
Priority: normallow
severity: normalminor
Status: assignednew
Version: None6.4.1

comment:2 Changed 11 years ago by igloo

Architecture: Unknown
difficulty: Unknown
Milestone: 6.8
Operating System: Unknown

comment:3 Changed 10 years ago by simonmar

Milestone: 6.8 branch_|_

comment:4 Changed 10 years ago by simonmar

Priority: lownormal

See also #2046. Raising priority based on feedback.

comment:5 Changed 10 years ago by simonmar

See also #984 and #999 for more poor parse-error messages.

comment:6 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:7 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:8 Changed 8 years ago by simonmar

Owner: simonmar deleted

comment:9 Changed 8 years ago by simonmar

Type of failure: Other

comment:10 Changed 6 years ago by simonmar

See also #5057 for another example.

comment:11 Changed 5 years ago by morabbin

See also #989.

comment:12 Changed 5 years ago by igloo

Resolution: Nonefixed
Status: newclosed

The error is now

parse error (possibly incorrect indentation or mismatched brackets)

which is I think as we're going to get. While we can see that it's obviously a bracket problem rather than an indentation problem in this small example, in general it's hard for GHC to suggest the right one, so suggesting both seems reasonable.

Note: See TracTickets for help on using tickets.