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

GHC ghc-devs at haskell.org
Wed Jun 1 02:27:54 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):

 Here's the stuff currently being used in SDoc computations, pulled out
 into 'PprFlags':

 {{{

 data PprFlags = PprFlags {
     pprCols          :: Int
   , pprUserLength    :: Int
   , useUnicode       :: Bool
   , useUnicodeSyntax :: Bool
   , targetPlatform   :: Platform
   , pkgState         :: PackageState
   , suppressUniques  :: Bool
   , suppressModulePrefixes   :: Bool
   , suppressVarKinds         :: Bool
   , errorSpans               :: Bool
   , reverseErrors            :: Bool
   , printExplicitRuntimeReps :: Bool
   , printExplicitCoercions   :: Bool
   , printExplicitForalls     :: Bool
   , printExplicitKinds       :: Bool
   , printEqualityRelations   :: Bool
   , suppressCoercions        :: Bool
   , suppressTypeSignatures   :: Bool
   , suppressTypeApplications :: Bool
   , suppressIdInfo           :: Bool
   , suppressUnfoldings       :: Bool
   , caseAsLet                :: Bool
   , showTicks                :: Bool
   , printTypecheckerElaboration :: Bool
   , sccProfilingOn              :: Bool
   , splitSections               :: Bool
   , impredicativeTypes          :: Bool
   , llvmFillUndefWithGarbage    :: Bool
   , platformConstants           :: PlatformConstants
   }
 }}}

 There might be a few more - I was nearly done when this conversation
 started, and figured I should pause until it was clear that something like
 this was wanted.

 Most of the signature changes are in the CmmCode, where there are loads of
 functions that currently take 'DynFlags' which I changed to take
 'PlatformConstants', since there are large chunks of code that only need
 the 'DynFlags' in order to access 'PlatformConstants', and these functions
 get used in the pretty printer / codegen intersection.

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


More information about the ghc-tickets mailing list