summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-06-24 13:01:37 -0400
committerBen Gamari <ben@smart-cactus.org>2017-07-20 22:45:15 -0400
commit63ccd40224a727065a4497d3d96f0ab783236c1a (patch)
treee0ab9a00bb3faca7da1d9a5bf8b98dc349f66624
parent34edba0e312cb736b26370536f65fb49d9b51b5e (diff)
downloadhaskell-63ccd40224a727065a4497d3d96f0ab783236c1a.tar.gz
Try something
-rw-r--r--compiler/utils/Pretty.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index 0f6ca4b5d3..a7969e61d7 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.