Inconsistency in parsing trailing commas inside import section
The following Haskell code compiles without problems:
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:
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.
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Parser) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |