#3749: unexpected parse errors with `do` and `let`
----------------------------------------+-----------------------------------
  Reporter:  dherington                 |          Owner:                      
      Type:  bug                        |         Status:  closed              
  Priority:  normal                     |      Milestone:                      
 Component:  Compiler                   |        Version:  6.10.4              
Resolution:  invalid                    |       Keywords:  do, let, parse error
Difficulty:                             |             Os:  Windows             
  Testcase:                             |   Architecture:  x86                 
   Failure:  GHC rejects valid program  |  
----------------------------------------+-----------------------------------
Changes (by simonmar):

  * status:  new => closed
  * difficulty:  =>
  * resolution:  => invalid

Comment:

 On what grounds do you think `f2` and `f3` should be syntactically
 correct?  In both cases, the semi-colon and `return x` are part of the
 `let`, not part of the `do`.  The layout rule would need multi-token
 lookahead in order to determine the alternative parse (inserting a close
 brace before the `;`), and it doesn't do that.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3749#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to