diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-18 21:02:31 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-18 21:17:04 +0100 |
commit | e6e3a960b23efa683bc04203d794e867a6c1bb27 (patch) | |
tree | 8b946a32bc879b2bf2cee6a8a21697c5ced2d5bd /compiler/utils/Pretty.lhs | |
parent | 42de5409e939b5a2bd9432875f85eb4091832fd8 (diff) | |
download | haskell-e6e3a960b23efa683bc04203d794e867a6c1bb27.tar.gz |
Make -dppr-cols a dynamic flag
Diffstat (limited to 'compiler/utils/Pretty.lhs')
-rw-r--r-- | compiler/utils/Pretty.lhs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/utils/Pretty.lhs b/compiler/utils/Pretty.lhs index cc8f235f2c..abe8957966 100644 --- a/compiler/utils/Pretty.lhs +++ b/compiler/utils/Pretty.lhs @@ -1002,13 +1002,10 @@ spaces n | n <=# _ILIT(0) = "" \end{code} \begin{code} -pprCols :: Int -pprCols = opt_PprCols - -printDoc :: Mode -> Handle -> Doc -> IO () -printDoc LeftMode hdl doc +printDoc :: Mode -> Int -> Handle -> Doc -> IO () +printDoc LeftMode _ hdl doc = do { printLeftRender hdl doc; hFlush hdl } -printDoc mode hdl doc +printDoc mode pprCols hdl doc = do { fullRender mode pprCols 1.5 put done doc ; hFlush hdl } where |