[GHC] #10961: Make it possible to purely use the parser
GHC
ghc-devs at haskell.org
Mon Oct 12 19:15:10 UTC 2015
#10961: Make it possible to purely use the parser
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: task | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.10.2
(Parser) |
Keywords: newcomer | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10961>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list