[GHC] #16279: Lexer: Alternate Layout Rule injects actual not virtual braces

#16279: Lexer: Alternate Layout Rule injects actual not virtual braces -------------------------------------+------------------------------------- Reporter: alanz | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 (Parser) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Incorrect API Unknown/Multiple | annotation Test Case: | Blocked By: Blocking: | Related Tickets: #13807 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When the alternate layout rule is activated via a pragma, it injects tokens for `{` and `}` to make sure that the source is parsed properly. But it injects `ITocurly` and `ITccurly`, rather than their virtual counterparts `ITvocurly` and `ITvccurly`. This causes problems for `ghc-exactprint`, which tries to print these. Test case (the existing T13087.hs) {{{#!hs {-# LANGUAGE AlternativeLayoutRule #-} {-# LANGUAGE LambdaCase #-} isOne :: Int -> Bool isOne = \case 1 -> True _ -> False main = return () }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16279 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16279: Lexer: Alternate Layout Rule injects actual not virtual braces -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.3 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect API | Unknown/Multiple annotation | Test Case: Blocked By: | Blocking: Related Tickets: #13807 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by alanz): * owner: (none) => alanz * milestone: => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16279#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16279: Lexer: Alternate Layout Rule injects actual not virtual braces -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: merge Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.3 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect API | Unknown/Multiple annotation | Test Case: Blocked By: | Blocking: Related Tickets: #13807 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by alanz): * status: new => merge Comment: This has landed in master as https://gitlab.haskell.org/ghc/ghc/commit/c1cf2693d6efddeeeb813cd8995a1be136... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16279#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16279: Lexer: Alternate Layout Rule injects actual not virtual braces -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: merge Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.3 (Parser) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect API | Unknown/Multiple annotation | Test Case: Blocked By: | Blocking: Related Tickets: #13807 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/284 -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/284 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16279#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16279: Lexer: Alternate Layout Rule injects actual not virtual braces
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: alanz
Type: bug | Status: merge
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.6.3
(Parser) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect API | Unknown/Multiple
annotation | Test Case:
Blocked By: | Blocking:
Related Tickets: #13807 | Differential Rev(s):
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/284
-------------------------------------+-------------------------------------
Comment (by Marge Bot
participants (1)
-
GHC