[GHC] #10143: Separate PprFlags (used by Outputable) from DynFlags

GHC ghc-devs at haskell.org
Thu May 19 10:53:28 UTC 2016


#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 dalaing):

 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`.

 That's just to handle the existing use cases, where folks have used
 `sdocWithDynFlags` to get hold of info they need for pretty printing where
 that information isn't plumbed in from anywhere.

 We could shift the non-rendering information from `PprFlags` into
 `SDocContext` - but since `PprFlags` is only being used via an
 `SDocContext`, it wouldn't be much of a change from the way things are
 now.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10143#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list