summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-17 17:11:19 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-18 23:07:47 -0400
commit2af0ec9059b94e1fa6b37eda60216e0222e1a53d (patch)
treedb9449d504a8e0065bf2cbfd1243c4837ad2476a /compiler/GHC/Driver
parentda18ff9935e72c7fe6127cb5d5d0c53654a204b0 (diff)
downloadhaskell-2af0ec9059b94e1fa6b37eda60216e0222e1a53d.tar.gz
DynFlags: store default depth in SDocContext (#17957)
It avoids having to use DynFlags to reach for pprUserLength.
Diffstat (limited to 'compiler/GHC/Driver')
-rw-r--r--compiler/GHC/Driver/Session.hs1
-rw-r--r--compiler/GHC/Driver/Session.hs-boot3
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 0d08d0cc26..d2f1b42ac3 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -5177,6 +5177,7 @@ initSDocContext dflags style = SDC
, sdocColScheme = colScheme dflags
, sdocLastColour = Col.colReset
, sdocShouldUseColor = overrideWith (canUseColor dflags) (useColor dflags)
+ , sdocDefaultDepth = pprUserLength dflags
, sdocLineLength = pprCols dflags
, sdocCanUseUnicode = useUnicode dflags
, sdocHexWordLiterals = gopt Opt_HexWordLiterals dflags
diff --git a/compiler/GHC/Driver/Session.hs-boot b/compiler/GHC/Driver/Session.hs-boot
index 3dcc6b3a6e..41daf4d3b2 100644
--- a/compiler/GHC/Driver/Session.hs-boot
+++ b/compiler/GHC/Driver/Session.hs-boot
@@ -8,8 +8,7 @@ import {-# SOURCE #-} GHC.Unit.State
data DynFlags
targetPlatform :: DynFlags -> Platform
-pprUserLength :: DynFlags -> Int
-unitState :: DynFlags -> UnitState
+unitState :: DynFlags -> UnitState
unsafeGlobalDynFlags :: DynFlags
hasPprDebug :: DynFlags -> Bool
hasNoDebugOutput :: DynFlags -> Bool