Commit 38113ad2 authored by benl's avatar benl
Browse files

Add -dppr-colsN to set width of dumps

parent 1e4f900a
......@@ -122,6 +122,7 @@ static_flags = [
------ 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)
......
......@@ -21,6 +21,7 @@ module StaticFlags (
-- Output style options
opt_PprUserLength,
opt_PprCols,
opt_PprCaseAsLet,
opt_PprStyle_Debug, opt_TraceLevel,
opt_NoDebugOutput,
......@@ -233,8 +234,12 @@ opt_SuppressTypeSignatures
-- | 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")
......
......@@ -185,7 +185,7 @@ import BufWrite
import FastString
import FastTypes
import Panic
import StaticFlags
import Numeric (fromRat)
import System.IO
--import Foreign.Ptr (castPtr)
......@@ -999,7 +999,7 @@ spaces n | n <=# _ILIT(0) = ""
\begin{code}
pprCols :: Int
pprCols = 100 -- could make configurable
pprCols = opt_PprCols
printDoc :: Mode -> Handle -> Doc -> IO ()
printDoc LeftMode hdl doc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment