Opened 9 years ago

Closed 15 months 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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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 8 years ago by simonmar

  • Description modified (diff)
  • Owner changed from nobody to simonmar
  • Priority changed from normal to low
  • severity changed from normal to minor
  • Status changed from assigned to new
  • Version changed from None to 6.4.1

comment:2 Changed 7 years ago by igloo

  • Architecture set to Unknown
  • Difficulty set to Unknown
  • Milestone set to 6.8
  • Operating System set to Unknown

comment:3 Changed 6 years ago by simonmar

  • Milestone changed from 6.8 branch to _|_

comment:4 Changed 6 years ago by simonmar

  • Priority changed from low to normal

See also #2046. Raising priority based on feedback.

comment:5 Changed 6 years ago by simonmar

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

comment:6 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:7 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:8 Changed 5 years ago by simonmar

  • Owner simonmar deleted

comment:9 Changed 4 years ago by simonmar

  • Type of failure set to Other

comment:10 Changed 3 years ago by simonmar

See also #5057 for another example.

comment:11 Changed 15 months ago by morabbin

See also #989.

comment:12 Changed 15 months ago by igloo

  • Resolution changed from None to fixed
  • Status changed from new to closed

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.