[GHC] #15392: Inconsistency in parsing trailing commas inside import section
GHC
ghc-devs at haskell.org
Mon Jul 16 04:33:17 UTC 2018
#15392: Inconsistency in parsing trailing commas inside import section
-------------------------------------+-------------------------------------
Reporter: chshersh | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
(Parser) |
Keywords: | Operating System: Unknown/Multiple
imports,trailing,commas |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The following Haskell code compiles without problems:
{{{#!hs
import Data.Bool (Bool,)
}}}
As I understand, trailing commas are allowed at the end of `import`
declaration. But if I have trailing comma inside data type import part, I
see parse error:
{{{#!hs
import Data.Bool (Bool (True,))
}}}
I don't see why this code is forbidden. But allowing trailing commas
inside parts of data type imports will make support for automatic
refactoring tools easier since they don't need to care about this special
case for removing trailing comma manually.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15392>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list