Make it possible to purely use the parser
It is claimed that the parser is pure but one of the arguments is DynFlags. The only safe way to construct a copy of DynFlags requires IO so it is not possible to use the parser purely.
I propose to introduce a new datatype ParserOptions which contains the options used by the parser and a function DynFlags -> ParserOptions so that it is possible to purely construct a ParserOptions and use the parser purely. This would be useful for external users of the parser.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.2 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |