------ Debugging ----------------------------------------------------
, Flag "dppr-debug" (PassFlag addOpt)
+ , Flag "dppr-cols" (AnySuffix addOpt)
, Flag "dppr-user-length" (AnySuffix addOpt)
, Flag "dppr-case-as-let" (PassFlag addOpt)
, Flag "dsuppress-all" (PassFlag addOpt)
-- Output style options
opt_PprUserLength,
+ opt_PprCols,
opt_PprCaseAsLet,
opt_PprStyle_Debug, opt_TraceLevel,
opt_NoDebugOutput,
-- | Display case expressions with a single alternative as strict let bindings
opt_PprCaseAsLet :: Bool
-opt_PprCaseAsLet
- = lookUp (fsLit "-dppr-case-as-let")
+opt_PprCaseAsLet = lookUp (fsLit "-dppr-case-as-let")
+
+-- | Set the maximum width of the dumps
+opt_PprCols :: Int
+opt_PprCols = lookup_def_int "-dppr-cols" 100
+
opt_PprStyle_Debug :: Bool
opt_PprStyle_Debug = lookUp (fsLit "-dppr-debug")
import FastString
import FastTypes
import Panic
-
+import StaticFlags
import Numeric (fromRat)
import System.IO
--import Foreign.Ptr (castPtr)
\begin{code}
pprCols :: Int
-pprCols = 100 -- could make configurable
+pprCols = opt_PprCols
printDoc :: Mode -> Handle -> Doc -> IO ()
printDoc LeftMode hdl doc