Ticket #210 (new bug report)
Parse errors when TransformListComp extension is enabled
| Reported by: | iago | Owned by: | nibro |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | parser | Version: | 1.10.0 |
| Keywords: | Cc: |
Description
I'm experiencing many strange parse errors when parsing with all extensions enabled:
Parse error: l-i
Parse error: m-n
Parse error in expression: off_b +
Parse error: group
...
I know the code is fine because it actually compiles, the only thing I do before parse these files with haskell-src-exts is to run cpphs --noline over them, the output of cpphs is what I'm parsing.
I was able to isolate one of these faults (I could take a look on others if that helps):
The following module
Prelude Language.Haskell.Exts> f "module Bar where\n\nimport Data.List ( group )\n\n"
is not correctly parsed when all known extensions are activated
Prelude Language.Haskell.Exts> parseModuleWithMode (defaultParseMode{extensions=knownExtensions}) f
ParseFailed (SrcLoc {srcFilename = "<unknown>.hs", srcLine = 3, srcColumn = 20}) "Parse error: group"
but parsing without any extension enabled works
Prelude Language.Haskell.Exts> parseModule f
ParseOk (Module (SrcLoc {srcFilename = "<unknown>.hs", srcLine = 1, srcColumn = 1}) (ModuleName "Bar") [] Nothing Nothing [ImportDecl {importLoc = SrcLoc {srcFilename = "<unknown>.hs", srcLine = 3, srcColumn = 1}, importModule = ModuleName "Data.List", importQualified = False, importSrc = False, importPkg = Nothing, importAs = Nothing, importSpecs = Just (False,[IVar (Ident "group")])}] [])
Note: The exact version is the 1.10.1.
