[commit: ghc] wip/prettyprinter: Use hardlineCollapse (2df0b55)
git at git.haskell.org
git at git.haskell.org
Wed Sep 13 21:09:18 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/prettyprinter
Link : http://ghc.haskell.org/trac/ghc/changeset/2df0b55c7bcf29526e4d966c4652ca0074556590/ghc
>---------------------------------------------------------------
commit 2df0b55c7bcf29526e4d966c4652ca0074556590
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Sep 13 17:02:27 2017 -0400
Use hardlineCollapse
>---------------------------------------------------------------
2df0b55c7bcf29526e4d966c4652ca0074556590
compiler/utils/Pretty.hs | 2 +-
libraries/prettyprinter | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index a38df9d..92acb84 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -214,7 +214,7 @@ infixl 6 <+>
infixl 5 $$, $+$
-}
($+$) :: Doc a -> Doc a -> Doc a
-($+$) a b = vsep [a, b]
+($+$) a b = a <> hardlineCollapse 1 <> b
($$) :: Doc a -> Doc a -> Doc a
($$) = ($+$)
diff --git a/libraries/prettyprinter b/libraries/prettyprinter
index 973be20..5c92fd0 160000
--- a/libraries/prettyprinter
+++ b/libraries/prettyprinter
@@ -1 +1 @@
-Subproject commit 973be208c28f0ec34c9cf7874bea9718996db776
+Subproject commit 5c92fd07537bb7070fcb560f671d4c7bb3aa7aad
More information about the ghc-commits
mailing list