[commit: ghc] wip/prettyprinter: Try something (317c9f8)

git at git.haskell.org git at git.haskell.org
Thu Jan 18 18:08:06 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/prettyprinter
Link       : http://ghc.haskell.org/trac/ghc/changeset/317c9f82b2b8cf8bf2b33860f67102e7bb5495ea/ghc

>---------------------------------------------------------------

commit 317c9f82b2b8cf8bf2b33860f67102e7bb5495ea
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat Jun 24 13:01:37 2017 -0400

    Try something


>---------------------------------------------------------------

317c9f82b2b8cf8bf2b33860f67102e7bb5495ea
 compiler/utils/Pretty.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index a611b78..4d6796d 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -1009,10 +1009,10 @@ renderStyle s d = TL.unpack $ renderLazy (layoutPretty (styleToLayoutOptions s)
 
 printDoc :: Mode -> Int -> Handle -> Doc a -> IO ()
 -- printDoc adds a newline to the end
-printDoc mode cols hdl doc = printDoc_ mode cols hdl (doc <> hardline)
+printDoc mode cols hdl doc = printDoc_ mode cols hdl (doc)
 
 printDoc_ :: Mode -> Int -> Handle -> Doc a -> IO ()
-printDoc_ mode pprCols hdl doc = TL.hPutStr hdl (renderLazy $ layoutPretty (mkLayoutOptions mode pprCols) doc) where
+printDoc_ mode pprCols hdl doc = TL.hPutStrLn hdl (renderLazy $ layoutPretty (mkLayoutOptions mode pprCols) doc) where
   mkLayoutOptions :: Mode -> Int -> LayoutOptions
   -- Note that this should technically be 1.5 as per the old implementation.
   -- I have no idea why that is.



More information about the ghc-commits mailing list