Ticket #440 (closed bug: None)

Opened 8 years ago

Last modified 43 years ago

parse error way too late

Reported by: as49 Owned by: nobody
Priority: normal Milestone:
Component: Compiler (Parser) Version: 6.2.2
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

On the attached file the compiler reports

typeerror.hs:29: parse error (possibly incorrect
indentation)

where line no 29 is the type signature of the second
function (lookup). I thought ghc was off by one line
and looked desperately at line 30 (which was stupid
since ghc's line numbers are only too far down, never
early). The solution is that I missed the equal sign in
the first function. I report this since I'm puzzled by
the fact that ghc got all the way down to the next type
signature before the parser found an error.

Axel.

Attachments

typeerror.2.hs Download (1.5 KB) - added by as49 8 years ago.

Change History

Changed 8 years ago by as49

Changed 8 years ago by as49

  • status changed from assigned to closed

Changed 8 years ago by simonmar

  • status changed from assigned to closed
Logged In: YES 
user_id=48280

The parse error is on the invisible ';'  inserted by layout
before the 'lookup' token.  Before that, the declaration is
a syntactically correct prefix of a declaration (the do
expression is inside the guard!).
Note: See TracTickets for help on using tickets.