Simon Peyton Jones pushed to branch wip/T26330 at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • compiler/GHC/Driver/DynFlags.hs
    ... ... @@ -708,8 +708,8 @@ defaultDynFlags mySettings =
    708 708
             ghciBrowserPlaywrightLaunchOpts = Nothing,
    
    709 709
     
    
    710 710
             flushOut = defaultFlushOut,
    
    711
    -        pprUserLength = 5,
    
    712
    -        pprCols = 100,
    
    711
    +        pprUserLength = defaultSDocDepth,
    
    712
    +        pprCols = defaultSDocCols,
    
    713 713
             useUnicode = False,
    
    714 714
             useColor = Auto,
    
    715 715
             canUseColor = False,
    

  • compiler/GHC/Utils/Outputable.hs
    ... ... @@ -103,6 +103,7 @@ module GHC.Utils.Outputable (
    103 103
             updSDocContext,
    
    104 104
             SDocContext (..), sdocWithContext,
    
    105 105
             defaultSDocContext, traceSDocContext,
    
    106
    +        defaultSDocDepth, defaultSDocCols,
    
    106 107
             getPprStyle, withPprStyle, setStyleColoured,
    
    107 108
             pprDeeper, pprDeeperList, pprSetDepth,
    
    108 109
             codeStyle, userStyle, dumpStyle,
    
    ... ... @@ -451,6 +452,12 @@ instance IsString SDoc where
    451 452
     instance Outputable SDoc where
    
    452 453
       ppr = id
    
    453 454
     
    
    455
    +defaultSDocDepth :: Int
    
    456
    +defaultSDocDepth = 6
    
    457
    +
    
    458
    +defaultSDocCols :: Int
    
    459
    +defaultSDocCols = 100
    
    460
    +
    
    454 461
     -- | Default pretty-printing options
    
    455 462
     defaultSDocContext :: SDocContext
    
    456 463
     defaultSDocContext = SDC
    
    ... ... @@ -458,8 +465,8 @@ defaultSDocContext = SDC
    458 465
       , sdocColScheme                   = Col.defaultScheme
    
    459 466
       , sdocLastColour                  = Col.colReset
    
    460 467
       , sdocShouldUseColor              = False
    
    461
    -  , sdocDefaultDepth                = 6
    
    462
    -  , sdocLineLength                  = 100
    
    468
    +  , sdocDefaultDepth                = defaultSDocDepth
    
    469
    +  , sdocLineLength                  = defaultSDocCols
    
    463 470
       , sdocCanUseUnicode               = False
    
    464 471
       , sdocPrintErrIndexLinks          = False
    
    465 472
       , sdocHexWordLiterals             = False