Opened 4 years ago

Closed 4 years ago

#5629 closed feature request (wontfix)

missing "where" gives unclear error message

Reported by: max.rabkin Owned by:
Priority: normal Milestone:
Component: Compiler (Parser) Version: 7.0.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

module Main
data Foo = Foo

/tmp/foo.hs:2:0: parse error on input `data'

It would be nice to say what was wrong (if there is a long comment after the module declaration, it can be difficult to spot what's missing)

Change History (1)

comment:1 Changed 4 years ago by simonmar

  • Resolution set to wontfix
  • Status changed from new to closed

You are right, but it's not likely we'll do anything about this. GHC's parser is generated by Happy, and in general it's not possible to give more informative parse error messages without more support from Happy itself.

Note: See TracTickets for help on using tickets.