
#10143: Separate PprFlags (used by Outputable) from DynFlags -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10961 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I think your goal is this (taken from the top of the ticket).
At the moment, SDoc computations have full access to the entirety of DynFlags, despite only a minusculely small amount of the data structure being relevant to them. This proposal is to split out a PprFlags structure which will be contained in a DynFlags, and contain dynamic flags JUST for pretty-printing.
Is that your goal? If so,seems a good goal. But that seems to contradict your comment:11, where you say
If PprFlags is to be strictly about rendering, then SDocContext either needs to continue to have DynFlags in it, or needs to carry around the PlatformConstants, the general flags, and a **whole heap of other stuff from DynFlags**.
My confusion is about whether it's true that `SDoc` computations need only a "miniscule" bit of `DynFlags`. If true, then this project seems worthwhile. If false, not so worthwhile. I think the reason no one is being clear about whether this change is wanted or not is that there is confusion about what "this change" actually is. Could you, for example, list exactly the things you propose to put in `PprFlags`? And what functions/data types change their signatures? Thanks -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10143#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler