[GHC] #8183: Parse error with let inside of do with { }

#8183: Parse error with let inside of do with { } ----------------------------+---------------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Parser) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC rejects valid program Architecture: | Test Case: Unknown/Multiple | Blocking: Difficulty: Unknown | Blocked By: | Related Tickets: | ----------------------------+---------------------------------------------- This line causes the error: {{{ err = do { let x = 1 ; Just x } }}} Breaking the line before the `;` fixes the error. This was tested on today's (27 Aug) HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8183 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8183: Parse error with let inside of do with { } ----------------------------------------------+---------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Parser) | Version: 7.7 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects valid program | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by igloo): * status: new => closed * resolution: => invalid Comment: Thanks for the report, but this isn't a bug: After applying the layout rule, the code looks like this: {{{ do { let { x = 1 ; Just x } } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8183#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8183: Parse error with let inside of do with { } ----------------------------------------------+---------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Parser) | Version: 7.7 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects valid program | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Comment (by goldfire): Bah! I didn't realize that the "parse error" clause of the layout rule does no look-ahead, allowing for the "capturing" of the semi-colon. Thanks for taking a look. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8183#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC