[commit: ghc] wip/annotate-core: Try something (63ccd40)

git at git.haskell.org git at git.haskell.org
Tue Jul 25 17:54:02 UTC 2017


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

On branch  : wip/annotate-core
Link       : http://ghc.haskell.org/trac/ghc/changeset/63ccd40224a727065a4497d3d96f0ab783236c1a/ghc

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

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

    Try something


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

63ccd40224a727065a4497d3d96f0ab783236c1a
 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 0f6ca4b..a7969e6 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -1008,10 +1008,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